Skip to content

Commit

Permalink
Fix order of dictionary type entry for /CIDToGIDMap for CID fonts
Browse files Browse the repository at this point in the history
The DictionaryConverter module uses the first entry in the type array as
the type class for the conversion. Since the converter is invoked for
/CIDToGIDMap due to 'Stream' being in the type array, it use 'Symbol' as
type class which is invalid.
  • Loading branch information
gettalong committed Nov 4, 2024
1 parent 4f8f493 commit 89fbe2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Fixed

* Checksum calculation for TrueType tables
* Automatic wrapping of dictionary entry /CIDToGIDMap for CID fonts


## 1.0.1 - 2024-11-04
Expand Down
2 changes: 1 addition & 1 deletion lib/hexapdf/type/cid_font.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CIDSystemInfo < Dictionary
define_field :W, type: PDFArray
define_field :DW2, type: PDFArray, default: [880, -1100]
define_field :W2, type: PDFArray
define_field :CIDToGIDMap, type: [Symbol, Stream]
define_field :CIDToGIDMap, type: [Stream, Symbol]

# Returns the unscaled width of the given CID in glyph units, or 0 if the width for the CID is
# missing.
Expand Down

0 comments on commit 89fbe2c

Please sign in to comment.