sciurius / perl-Text-Layout

Pango style markup formatting for PDF::API2, Markdown, Cairo and more
2 stars 2 forks source link

Use unifont() for font fallbacks #6

Open sciurius opened 4 years ago

sciurius commented 4 years ago

Originally posted by @PhilterPaper in https://github.com/sciurius/perl-Text-Layout/issues/4#issuecomment-571322674 @terefang has poked PhilterPaper/Perl-PDF-Builder#56, suggesting the use of unifont() for font fallbacks (a glyph doesn't exist in the current font, but might in a list of alternative fonts). I said that it doesn't appear to me that unifont would be useful for that purpose, but it got me to wondering if Text::Layout could handle it (as an extension). Text::Layout knows the current font in use (as well as attributes like size, bold, italic) and might be extended to look down a list of alternative font families if a glyph is missing from the current one (is this already in the capability list?). It might further be extended to give different font lists (like unifont does) for different ranges of code points (not necessarily just Unicode). Just some thoughts for the Roadmap.