Help language development. Donate to The Perl Foundation

PDF::Font::Loader cpan:WARRINGD last updated on 2022-07-26

Changes
0.6.7  2022-07-27T07:09:34+12:00
    - Fix fix decoding of CMap ligatures #19

0.6.6  2022-07-06T08:26:48+12:00
    - Further fixes to CID allocation in CMap encoder

0.6.5  2022-07-06T07:28:35+12:00
    - Improved CID allocation in CMap encoder
    - Mostly replace embedded DejaVuSans with more compact Vera font
      in the test suite PDF files. Reduce distribution size #19
    - Allow for fractional values in font widths (/W) array
    - Fix font subsetting (HarfBuzz::Subset integration)
    - Protect setting encoder differences

0.6.4  2022-05-28T09:55:17+12:00
    - Fix font-descriptor() handling of fonts with a TT_PCLT table

0.6.3  2022-05-18T09:51:56+12:00
    - Use thread-safe version of Font::FreeType. Protect internal low-level
      glyph access.

0.6.2  2022-05-17T08:10:11+12:00
    - Improved handling of core fonts. Use standard core-font metrics over
      substituted font metrics.
    - Provide separate ax and sx attributes in glyphs. ax is the actual expected
      advance, taken from the /Widths or /W entry for the font, or in the case
      of core fonts, the standard width for the character. sx is the width of the
      substituted font. This helps with the scaling and placement of glyphs while
      rendering.

0.6.1  2022-05-12T08:23:14+12:00
    Initial page-level thread-safety
    - Bump PDF and PDF::Content to thread-safe versions
    - Lock dynamic module loading
    - Lock font encoding and dictionary creation
    - Add t/threads.t

0.6.0  2022-01-30T13:36:52+13:00
    - Fix dictionary construction of CFF fonts #13
    - Use FontConfig module for font resolution

0.5.16  2021-12-18T07:38:03+13:00
    - Add FontObj underline-position() and underline-thickness() methods
    - Fix load-font() handling of :$dict option

0.5.15  2021-10-15T07:45:19+13:00
    - Add load-font(:$prefix) option. To enable a pre-determined prefix (6
      uppercase letters) for subsetted fonts. Used in the test-suite to
      create stable PDF files, without any random characters.
    - Fix font encoding issue #12

0.5.14  2021-10-09T09:02:52+13:00
    - Detect WOFF fonts and disable embedding.
    - Performance improvement to CID fonts

0.5.13  2021-08-05T12:36:58+12:00
    - Fix PDF::Class compatibility by ensuring /Type0 (CID) font
      dictionaries are created with all mandatory fields in place.

0.5.12  2021-08-03T17:31:00+12:00
    - Change Glyph width and height attributes from dx(), dy() to ax() ay()
      for consistency with HarfBuzz module.
    - Initialize FontDescriptor with a /FontName entry (required field)

0.5.11  2021-08-03T12:24:32+12:00
    - Fix CMap code ranges to encode and decode as UTF16BE. See
      ISO-32000 9.10.3 ToUnicode CMaps
    - Disable writing of experimental utf8, utf16 and utf32 encodings
      for now. Sticking point is creating a ToUnicode CMap that works
      across all code ranges.

0.5.10  2021-07-31T10:50:31+12:00
    - Fix PDF::Font::Loader::Enc::Unicode decode() method
    - Fix CMap ligature handling
    - Fix inverted Identity-H %.charset attribute
    - Fix ToUnicode 'bfrange' construction

0.5.9 
    - Add PDF::Font::Loader::Enc::Unicode encoder (experimental) for reading and
      writing utf8, utf16 and utf32 encodings and CMaps
    - Handle input and output of Type0 fonts with potentially separate /ToUnicode
      and /Encoding CMaps. Also secondary CMaps referenced via /UseCMap from the
      main CMap.

0.5.8  2021-07-21T14:08:58+12:00
    - Fix reading and writing of CMap code space ranges for conformance with
      https://adobe-type-tools.github.io/font-tech-notes/pdfs/5014.CIDFont_Spec.pdf

0.5.7  2021-07-17T09:50:01+12:00
    - Fix glyph lookup for an embedded font without a char-map.

0.5.6  2021-07-13T13:40:44+12:00
   - Tweak loading of CID fonts from font dictionaries.
   - Documentation. README.md has been split into multiple *.md files and expanded
     in the docs/ directory.

0.5.5  2021-07-09T08:21:49+12:00
   - Implement reading of CMaps with variable encoding and
     CID mappings #9

0.5.4  2021-07-05T09:20:00+12:00
   - Add new sub-class PDF::Font::Loader::FontObj::CID
   - Fix ToUnicode CMaps for subsetted fonts
   - Allow subsetting of 'CFF' format OpenType fonts. HarfBuzz can
     handle these.

0.5.3  2021-06-30T11:20:17+12:00
   Glyph maps #8
   - Rename PDF::Font::Loader::Metrics -> PDF::Font::Loader::Glyph
     and shape() method to glyphs()
   - Handle unknown and un-mapped custom type-1 glyphs. Provide
     a glyphs(@cids) multi method to allow glyph extraction when
     there's no unicode mapping
   - Handle /CIDToGIDMap entries in font dictionaries

0.5.2  2021-06-26T09:58:42+12:00
   - Added PDF::Font::Loader::Metrics class and $font-obj.shape
     method.

0.5.1  2021-06-24T13:52:53+12:00
    Reusing a font within a PDF copies it #6
   - Accept :$dict option re-use it, updating as needed (char-maps,
     widths, encoding differences.
   - Renamed PDF::Font::Loader::FreeType -> PDF::Font::Loader::FontObj
   - Make font width tables authoritative; stringwidth() method now
     checks the font's width array (/W or /Widths entry) before
     consulting font metrics.
   - Add glyph-width() rw method
   - Fix font-name() and is-embedded() methods

0.5.0  2021-06-19T10:10:30+12:00
   More forgiving font handling #7
   - Added support for TrueType Collections, which must be embedded.
   - Change font validation to accept any FreeType font, but check
     basic characteristic are present, and only restrict embedding
     to permitted font formats.
   - Warn and disable embedding, rather that aborting, if the font
     doesn't meet embedding criteria.
   - Changed default option for loading from PDF dictionary :!embed
   - Defer some error checks until font object construction; to make
     reading of PDF files even more forgiving.

0.4.4  2021-03-26T08:13:56+13:00
   - Add PDF::Content::FontObj role to PDF::Font::Loader::FreeType

0.4.3  2021-01-21T14:09:43+13:00
   - put cmap handling back into main freetype class; fix identity
     fonts.

Release 0.4.2
   - Adjust to PDF 0.4.5+ (renamed PDF::Writer -> PDF::IO::Writer)
   - Make CMAP encoding adaptive. An unknown character is mapped to
     win encoding. If that fails, unallocated cids are allocated
     sequentially as unknown characters are encountered.

Release 0.4.1
   - Add find-font(:$lang) option
   - Improved font descriptor encoding detection
   - Add experimental font subsetting via new HarfBuzz::Subset module;
     disabled by default (may change in a later release).

Release 0.4.0
   - Fixed handling of CFF fonts
   - Work-in-progress on font subsetting

Release 0.3.1
   - Improved FontDescriptor properties using TT_Sfnt, introduced with
     Font::FreeType  v0.3.3.
     -- Improved: /ItalicAngle
     -- Added: /FontWeight /AvgWidth /Leading /MaxWidth /Style << /Panose ... >>

Release 0.3.0
   - Adjust to Font::FreeType 0.3.0

Release 0.2.9
   - Rename sources *.pm -> *.rakumod
   - [PDF::Font::Loader::Enc::CMap][cmap-decode.t]
     -- Make some use of code-ranges in the CMAP file; this seems to be
        the correct way of distinguishing 1 or 2 byte encodings.
     -- Added some support for older CMap ligature idioms

Release 0.2.8
   - Update to Font::FreeType 0.2.1

Release 0.2.7
   - [PDF::Font::Loader::Enc::CMap]
     -- Skip obviously invalid Unicode code-points.
     -- Added .encode() method. Initial support for /Identity-H
        and /Identity-V schemes
     -- Fixed identity-h encoding and decoding (16bit)

Release 0.2.6
   - [PDF::Font::Loader::FreeType]
     -- fix 'std' encoding
     -- handle float widths (convert to Int)

Release 0.2.5
   - Make compatible with Font::FreeType 0.2.2

Release 0.2.4
   - [PDF::Font::Loader::Dict] Prefer toUnicode map
     over encoding in font dictionaries
   - Adjustments for Font::FreeType 0.1.7.

Release 0.2.3
   - added experimental loading from a PDF Font dictionary.

     load-font: :$dict

     Back ported from [PDF::To::Cairo::]FontLoader.

Release 0.2.2
    - replace positional with :family parameter in find-font(),
      load-font(). For consistency with PDF::Content.load-font
      method.

Release 0.2.1
    - renamed classes PDF::DAO -> PDF::COS in PDF v0.2.8

Release 0.2.0
    - warn on Type1 Font being embedded, but not used

Release 0.1.9
    - fix scoping issues with Identity-H encoding
    - don't compress Type1 fonts. These are already encrypted.
    - simplify load-font multi-methods

Release 0.1.8
    support for PDF::To::Cairo font (WIP)

Release 0.1.7
    - fix kern method

Release 0.1.6
    - Add FontDescriptor dictionary required fields:
          ItalicAngle, StemV, CapHeight, XHeight

Release 0.1.5
    - Add :find-font, :load-font export subs
    - Add load-font :embed option

Release 0.1.4
    - Renamed dist PDF::Font -> PDF::Font::Loader

Release 0.1.2
    - Add .find-font, :weight, :width, :slant options

Release 0.1.1
    - Restrict type-1 font to Win encoding, freetype to Identity-H.
    - Added PDF::Font.find-font method

Release 0.1.0
    - Fixed font dictionary for type1 identity-h encoding
    - Changed method load-font:
      -- PDF::Font.load-font: :$file; # load from a font file
      -- PDF::Font.load-font: :$name; # load a font by name (experimental)

Release 0.0.3
    - Documentation changes

Release 0.0.2
    - Avoid loading TrueType Collections (type *.ttc). Not supported
      by Ghostscript 9.20 (and possibly other readers)

Release 0.0.1
    - Initial release