Jump to content
You must now use your email address to sign in [click for more info] ×

Korean glyphs in Source Han Sans cause .pdf export to fail.


Recommended Posts

Operating system: Windows 10 Home | Affinity Publisher version: 1.8.3.641

When using a full charset version of the pan-CJK typeface, Source Han Sans (SHS), .pdf files can be exported when there is text rendered using Chinese glyphs, Japanese glyphs, or a combination of both. However, when using any number of Korean hangul glyphs (minimum of 1) with the same font (either alone or with Chinese/Japanese glyphs), the export fails to complete. All glyphs render properly within the application.

An indication of the problem can be seen before exporting, as in the export settings window,  the application will calculate the estimated filesize indefinitely if any pan-CJK SHS Korean glyphs are present in the document. The error message displayed afterwards is: "An error occurred while exporting to [filepath]." It is not a problem with the font files, as Chinese/Japanese glyphs from the same font work, other programs' .pdf export features work with Source Han Sans' Korean glyphs, and the font files were downloaded directly from the official repository: https://github.com/adobe-fonts/source-han-sans/tree/release. When the Korean glyphs are rendered using other Korean-language fonts, they can be exported. This problem can be reproduced in new documents. Using various export presets failed to resolve the issue. Not electing to embed fonts failed to resolve the issue. Changing font subsetting settings failed to resolve the issue. Changing various language-tagging options failed to resolve the issue.

The workaround that I found was to use the Korean "Region-Specific OTF" (within the Github repository) which only contained Korean glyphs. When I used the SHS KR version to render Korean text, and the pan-CJK version to render the Chinese/Japanese text, the .pdf export was successful. As such, I suspect that the issue may be tied to the way that Affinity Publisher reads large pan-CJK font files (the full charset version of SHS contains an extremely large number of glyphs—over 65,000), and particularly Korean glyphs, since Korean characters are individually constructed from component glyphs, while one Chinese/Japanese character is equivalent to 1 glyph.

On my machine, steps taken to isolate the issue were as follows:

1. Create three text boxes—one with Chinese text, one with Japanese text, and one with Korean text.

2. Apply Source Han Sans (any weight) to all text.

3. Export the document as a .pdf. The export should fail to complete.

4. Delete the box with Korean text.

5. Export the document as a .pdf. The export should complete successfully.

The issue can also be reproduced by only adding Korean text to a new document, applying the typeface, and attempting to export the document as a .pdf.

Edited by HoxhaBunkers
Added workaround method.
Link to comment
Share on other sites

  • 2 months later...
  • Staff

We have made fixes/improvements to this area (Korean glyphs from Source Han Sans > Unable to export PDF) of the program in the latest release.

The fixes and how to update are described in these forum posts.

We would appreciate you checking that this issue has now been resolved for you.

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

  • 1 month later...

I'm afraid that Affinity Publisher 1.8.5 for Windows still fails to embed TTF/TTC Chinese fonts in PDF. On a Windows 10 Simplified Chinese edition, OS-bundled TTF/TTC fonts like "Microsoft YaHei" and "FangSong" are turned into curves. An OTF font like "Source Han Sans SC" embeds fine, but the resulting PDF is huge: ~1MB for a single character "F".

Link to comment
Share on other sites

Hi @Gabe,

This is the result on my machine with Designer 1.8.5 and the attached F.afdesign:

1.thumb.png.a6e760c2786216daf9fae3ed17a0ec8a.png

If I choose the PDF/X-4 preset, the estimated file size will be 1.26 MB.

Even the size of 379.46 kB feels too big, if proper subsetting is performed. As a rather unfair comparison, the "F" PDF generated by XeLaTeX is just 2655 bytes.

F.afdesign xelatex-output.tex xelatex-output.pdf

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.