Rank: Member
Groups: Registered
Joined: 7/26/2016(UTC) Posts: 25  Location: Somerset Thanks: 5 times
|
Hi, I want to insert text into a PDF using a specified font. I have used your example code at: https://forum.patagames....t236-Saving-a-TextObjectto insert text into a page and it works perfectly. However, if I specify a font, say 'Courier' by editing the initialisation of the 'LOGFONT' to include 'lfFaceName', thus: LOGFONT lf = new LOGFONT() { ... lfFaceName = "Courier" }; Then it fails to use the specified font. In the PDF, the created font dictionary has an entry 'BaseFont' with value '????'. Although 'lfFaceName' is a C# string, the documentation suggests it should have a terminating null (ie. a C-type string). But it still fails to work even if I change the assignment to: lfFaceName = "Courier\0" What is the correct way to specify a font in 'LOGFONT'? Also, would a correct font dictionary be created if the specified font was of Subtype 'Type0' with Encoding 'Identity-H' (ie. a composite font composed of glyphs from a descendant CIDFont)? Finally, when adding text in this manner, is it possible to insert an embedded composite font with subsetting? Many thanks for your help.
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
|
|
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/26/2016(UTC) Posts: 25  Location: Somerset Thanks: 5 times
|
That’s great – many thanks Paul for your usual fast and helpful response.
I’ll test the new release later today and see if it can handle fonts other than simple Type 1 fonts!
Terry.
|
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close