lao_pdf_fixer 1.0.0 copy "lao_pdf_fixer: ^1.0.0" to clipboard
lao_pdf_fixer: ^1.0.0 copied to clipboard

Unicode-first Lao PDF text shaping for Flutter, powered by pdf_text_shaper and HarfBuzz.

lao_pdf_fixer #

Unicode-first Lao text rendering for PDFs generated with Flutter's pdf package.

This package is a thin language-focused facade over pdf_text_shaper. HarfBuzz performs real OpenType shaping while this package adds convenient font loading, script detection and PDF widgets.

Features #

  • HarfBuzz GSUB/GPOS shaping through pdf_text_shaper
  • Unicode-first Lao text
  • fallback fonts for mixed-script documents
  • multiline wrapping and reusable typography
  • optional invisible Unicode layer for search/copy
  • LaoText, LaoParagraph, LaoHeader
  • LaoRichText, LaoBulletList, LaoTable
  • LaoFontManager with safe asset caching/retry
  • no bundled fonts

Install #

dependencies:
  lao_pdf_fixer: ^1.0.0

Add a Unicode OpenType font that supports the Lao script. For example, a suitable Noto font such as NotoSansLao-Regular.ttf.

Basic usage #

final font = await LaoFontManager.instance.loadAsset(
  'assets/fonts/NotoSansLao-Regular.ttf',
);

LaoParagraph(
  'ພາສາລາວ: ຂ້ອຍກຳລັງຂຽນພາສາລາວ.',
  font: font,
  fontSize: 14,
)

Typography #

final typography = LaoTypography(
  regularFont: regular,
  boldFont: bold,
  fallbackFonts: [latinRegular],
  boldFallbackFonts: [latinBold],
);

LaoHeader(
  'Lao document',
  style: typography.heading(fontSize: 24),
)

Detection #

'ພາສາລາວ: ຂ້ອຍກຳລັງຂຽນພາສາລາວ.'.containsLao; // true

Font lifecycle #

await LaoFontManager.instance.dispose();

The package intentionally does not bundle fonts. Verify the license of any font you ship with your application.

Platforms #

Android, iOS, Linux, macOS and Windows. Web is not currently supported by the native shaping backend.

Repository #

This package is maintained in the central pdf_text_shaper repository:

0
likes
150
points
60
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Unicode-first Lao PDF text shaping for Flutter, powered by pdf_text_shaper and HarfBuzz.

Repository (GitHub)
View/report issues

Topics

#lao #pdf #unicode #text-shaping #typography

License

Apache-2.0 (license)

Dependencies

flutter, pdf, pdf_text_shaper

More

Packages that depend on lao_pdf_fixer