VECTOR AND UNICODE FONT

Just starting out? Need help? Post your questions and find answers here.
loulou2522
Enthusiast
Enthusiast
Posts: 556
Joined: Tue Oct 14, 2014 12:09 pm

VECTOR AND UNICODE FONT

Post 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
User avatar
kenmo
Addict
Addict
Posts: 2069
Joined: Tue Dec 23, 2003 3:54 am

Re: VECTOR AND UNICODE FONT

Post 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
Post Reply