pdflib-syntax-fonts

Official

Embed fonts correctly and avoid WinAnsi errors

AuthorOpenAEC-Foundation
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents runtime failures and incorrect rendering caused by using pdf-lib standard fonts for text that contains characters outside the WinAnsi subset, and guides correct embedding of custom fonts so Unicode, CJK, and other scripts render reliably.

Core Features & Use Cases

  • Correct Font Embedding: Explains when to use StandardFonts, embedStandardFont, and when to register fontkit and embed custom TTF/OTF bytes.
  • Unicode and Script Support: Shows how to use fontkit with custom fonts to render Cyrillic, CJK, Arabic, emoji, and other non-WinAnsi characters.
  • Text Measurement & Subsetting: Covers measurement methods, centering and alignment patterns, and subsetting decisions to balance file size and editability.
  • Anti-Patterns and Fixes: Lists common runtime errors (WinAnsi encoding, missing registerFontkit, forgetting await) and concrete fixes for production workflows.

Quick Start

Register fontkit, await embedding of a Unicode-capable font file, and use the resulting PDFFont to draw and measure text so non-Latin characters render without WinAnsi errors.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: pdflib-syntax-fonts
Download link: https://github.com/OpenAEC-Foundation/pdf-lib-Claude-Skill-Package/archive/main.zip#pdflib-syntax-fonts

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.