14 Commits

Author SHA1 Message Date
Mihai Bazon
e61366b37f Fix reading cmap table
The data offset must be saved before parsing one entry and restored
thereafter.  Otherwise only the first table is parsed properly, and garbage
is returned for the rest.  Fails on i.e. georgiai.ttf.

When reading the glyphIds, divide count by 2 (we read 16-bit words).
2014-08-16 11:50:52 +03:00
Devon Govett
bb9b77cb82 Allow loading fonts from Buffers in addition to filenames 2014-04-12 20:44:19 -07:00
Devon Govett
801981728c Make AFMFont.open different from constructor 2014-04-12 20:35:14 -07:00
Devon Govett
8c51ee077f Make sure that sfnt key exists in dfont so we don't throw random errors 2014-04-09 23:44:31 -07:00
Devon Govett
87fd69b7e5 Don't overwrite cmap method 2014-04-09 23:41:06 -07:00
Devon Govett
1305a9592a Switch to 2 space indentation 2014-03-23 12:25:09 -07:00
Devon Govett
25c0348755 Fix character width calculations (#185, #169)
Follows TTF hmtx rules for missing entries, and encodes WinAnsi first for builtin fonts.
2014-02-16 19:46:35 -08:00
Devon Govett
5b1f030329 Move WinAnsi encoding to AFMFont class 2014-02-16 19:43:25 -08:00
Devon Govett
cbaff9962d Work around silly CoffeeScript bug. Fixes #70. 2012-04-20 11:29:12 -07:00
Devon Govett
bfd4ab3e55 Fix weird DFont parsing issues. Should fix usage of Mac OS X system fonts. Closes #34. 2012-04-04 00:08:18 -07:00
Devon Govett
78c578972d Fix path 2011-07-26 22:02:11 -04:00
Devon Govett
a6ca7c7896 Unicode font support! 2011-07-20 01:54:15 -04:00
Devon Govett
9d90e25664 Font subsetting support. Only includes characters in embedded fonts that are actually used in the document. Please report bugs if you find them! 2011-07-17 01:13:44 -04:00
Devon Govett
9215fc1b02 Initial commit 2011-07-09 22:57:00 -04:00