kudlaty
unread,Mar 6, 2012, 5:49:45 AM3/6/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Harbour Users
Hi
I'm new in using library Haru to creating PDF and I have a strange
problem with trutype fonts.
This is my code:
.....................................
cFont := HPDF_LoadTTFontFromFile (hPDF, "c:\windows\fonts\COUR.ttf",
HPDF_TRUE)
hFCourier := HPDF_GetFont( hPDF, cFont, "CP1250" )
cFont := HPDF_LoadTTFontFromFile (hPDF, "c:\windows\fonts\COURBD.ttf",
HPDF_TRUE)
hFCourierB := HPDF_GetFont( hPDF, cFont, "CP1250" )
cFont := HPDF_LoadTTFontFromFile (hPDF, "c:\windows\fonts\TIMES.ttf",
HPDF_TRUE)
hFTimes := HPDF_GetFont( hPDF, cFont, "CP1250" )
cFont := HPDF_LoadTTFontFromFile (hPDF, "c:\windows\fonts
\TIMESBD.ttf", HPDF_TRUE)
hFTimesB := HPDF_GetFont( hPDF, cFont, "CP1250" )
cFont := HPDF_LoadTTFontFromFile (hPDF, "c:\windows\fonts
\ARIALBD.ttf", HPDF_TRUE)
hFTytul := HPDF_GetFont( hPDF, cFont, "CP1250" )
.....................................
HPDF_Page_SetFontAndSize( page, hFTimesB, 9 )
Everything works fine. PDF is created and in Acrobate Reader looks
perfect. All polish chars.
BUT
When I open PDF with Foxit Reader all fonts in bold (TIMESBD,
ARIALBD, COURBD) are changed and I don't have polish chars.
It looks like Foxit uses alternative font.
But why ??
I use HPDF_LoadTTFontFromFile with HPDF_TRUE what should embed the
font.
Opening my PDF in Acrobat Reader on "Windows XP english version" is
just disaster. Other fonts without polish chars in right places.
Is there Anyone who could explain this?
In the last resort I will be using only Acrobat Reader but maybe I do
sth. wrong.
Błażej Powroźnik