yoxem on Nostr: julia> using libharu_jll;pdf = @ccall libhpdf.HPDF_New(""::Cstring, ...
julia> using libharu_jll;pdf = @ccall libhpdf.HPDF_New(""::Cstring, 0::Cint)::Ptr{float};page = @ccall libhpdf.HPDF_AddPage(pdf::Ptr{float})::Ptr{float};font_name = @ccall libhpdf.HPDF_LoadTTFontFromFile(pdf::Ptr{float}, "/usr/share/fonts/truetype/freefont/FreeSerif.ttf"::Cstring, 1::Cint)::Cstring;
julia> @ccall libhpdf.HPDF_UseUTFEncodings(pdf::Ptr{float})::Ptr{float};
julia> @ccall libhpdf.HPDF_SetCurrentEncoder(pdf::Ptr{float}, "UTF-8"::Cstring)::Ptr{float};
julia> font2 = @ccall libhpdf.HPDF_GetFont(pdf::Ptr{float}, font_name::Cstring, "UTF-8"::Cstring)::Ptr{float};
julia> @ccall libhpdf.HPDF_Page_SetFontAndSize(page::Ptr{float}, font2::Ptr{float}, 20.0::Cfloat)::Ptr{Cfloat};
julia> @ccall libhpdf.HPDF_Page_BeginText(page::Ptr{float})::Ptr{float};
julia> @ccall libhpdf.HPDF_Page_TextOut(page::Ptr{float}, 45.0::Cfloat, 630.0::Cfloat, "123 上下中 שׁלום"::Cstring)::Ptr{float};
julia> @ccall libhpdf.HPDF_Page_EndText(page::Ptr{float})::Ptr{float};
julia> @ccall libhpdf.HPDF_SaveToFile(pdf::Ptr{float}, "test4.pdf"::Cstring)::Ptr{float};
可用utf-8 但是希伯來文順序會顛倒 #libharu #julia
julia> @ccall libhpdf.HPDF_UseUTFEncodings(pdf::Ptr{float})::Ptr{float};
julia> @ccall libhpdf.HPDF_SetCurrentEncoder(pdf::Ptr{float}, "UTF-8"::Cstring)::Ptr{float};
julia> font2 = @ccall libhpdf.HPDF_GetFont(pdf::Ptr{float}, font_name::Cstring, "UTF-8"::Cstring)::Ptr{float};
julia> @ccall libhpdf.HPDF_Page_SetFontAndSize(page::Ptr{float}, font2::Ptr{float}, 20.0::Cfloat)::Ptr{Cfloat};
julia> @ccall libhpdf.HPDF_Page_BeginText(page::Ptr{float})::Ptr{float};
julia> @ccall libhpdf.HPDF_Page_TextOut(page::Ptr{float}, 45.0::Cfloat, 630.0::Cfloat, "123 上下中 שׁלום"::Cstring)::Ptr{float};
julia> @ccall libhpdf.HPDF_Page_EndText(page::Ptr{float})::Ptr{float};
julia> @ccall libhpdf.HPDF_SaveToFile(pdf::Ptr{float}, "test4.pdf"::Cstring)::Ptr{float};
可用utf-8 但是希伯來文順序會顛倒 #libharu #julia
