Page 1 of 1

VECTOR AND UNICODE FONT

Posted: Fri Nov 14, 2025 5:20 pm
by loulou2522
I try to load a font to use character for table but when i try to use rthis font that's dosen't work

Code: Select all

If RegisterFontFile(GetUserDirectory(#PB_Directory_Desktop    ) + "Fixedsys 8514oem (Unicode).ttf") 
 Debug  LoadFont(0, "Fixedsys 8514oem (Unicode)", 12)
  If StartVectorDrawing(PdfVectorOutput("test.pdf", 595, 842))  
    VectorFont(FontID(0), 12)
    MovePathCursor(20, 20)
    DrawVectorText(Chr(208))
    NewVectorPage()
    MovePathCursor(20, 20)
    DrawVectorText("Voici la page 2...")      
    StopVectorDrawing()
  EndIf
EndIf
End 
Can someone help me

Re: VECTOR AND UNICODE FONT

Posted: Fri Nov 14, 2025 5:33 pm
by kenmo
Unfortunately the vector drawing library can only use fonts officially installed in your system. I don't know the technical reason, maybe someone else here does.

See the doc for VectorFont()
"Remarks: You cannot use a registered font with RegisterFontFile()."
https://www.purebasic.com/documentation ... rfont.html