Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering or logging in.

[RT 130040] Mention cannot make synthetic cjkfont

  • 1 Replies
  • 81 Views
*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 587
    • View Profile
[RT 130040] Mention cannot make synthetic cjkfont
« July 11, 2019, 02:29:00 PM »
Wed Jul 10 22:02:59 2019 jidanni [...] jidanni.org - Ticket created

We read
Code: [Select]
$font = $pdf->synfont($basefont, [%options])
Returns a new synthetic font object. OK, but mention cannot use with cjkfonts:
Code: [Select]
my $font = $pdf->cjkfont('traditional');
$font2 = $pdf->synfont($font, -slant => 0.85);

Makes a mess out of a document.

[Verify and update documentation as necessary]

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 587
    • View Profile
Re: [RT 130040] Mention cannot make synthetic cjkfont
« Reply #1: August 06, 2019, 08:17:22 PM »
Investigated, and indeed, synfont does not produce a good synthesized font when used against a base font file created with cjkfont. Confirmed that it works properly for corefont, psfont, and ttfont. As with the failure to embed CJK files (RT 130041), this has something to do with the internal format of the CJK font file, and possibly its history of external Cmap and Data files. At this point, it doesn't appear to be worth extensively reworking the innards of CJK fonts, but if someone wants to dive into the code and find a fix, you're welcome to. I have updated the documentation to inform users that synfont cannot be used on cjkfont fonts.

Closed, in release 3.016.