How can I select a window font in harupdf?
I want use "Curier New". I tried:
Humm ... Courier New
No ?
A+
--
Hello,
For use "Courier-New" :
....
/*
"Courier New" =>"cour.ttf"
"Courier New Bold" => "courbd.ttf"
"Courier New Bold Italic"=>"courbi.ttf"
"Courier New Italic" =>"couri.ttf"
*/
cFontName := HPDF_LoadTTFontFromFile( ::hPdf, "cour.ttf", .t. )
HPDF_GetFont( ::hPdf, cFontName, "WinAnsiEncoding" )
...
Best Regards,
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/71d0eb77-f75b-4d43-a8a6-fa7dad6b4e72n%40googlegroups.com.
win_EnumFonts( [<hDC>
] ) ➜ aFonts
enumerates the fonts available on a specified <hDC>
device.
returns array of sub-arrays of all available fonts for the device given, where each sub-array corresponds to each enumerated font instance. Structure of sub-array is: {cFacename, lFixedPitch, lTrueType, nCharset}
If <hDC>
omitted, default is screen.
win_EnumFontFamilies([<hDC>], [<cFaceName>]
) ➜ aFonts
It's similar to above win_EnumFonts() but accepts an optional <cFaceName>
argument that limits enumaration on the given face (font) name only.
Returns array of sub-arrays of the given font instances, if available, (or all available fonts, when <cFaceName>
omitted) for the specified device, where each sub-array corresponds to each enumerated font instance. Structure of sub-array is: {cFacename, lFixedPitch, lTrueType, nCharset}
If no <hDC>
specified, default is screen.
Worth to note that MS is suggesting the usage of this function, instead of win_EnumFonts(), which "is provided only for compatibility with 16-bit versions of Windows".
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/433bea51-814d-4cda-a7d1-d76b4c989592n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/ca0c927a-5326-43db-ab92-8646da6f8401n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/2cf07351-dcf6-4782-80ef-65bd5df0428fn%40googlegroups.com.
Check the url, it shows how to load file and get name.
José M. C. Quintas
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/74aeb42b-e6e2-49c1-86b0-16261c978108n%40googlegroups.com.