Devon Govett
6b2bea9835
Merge branch 'master' of github.com:devongovett/pdfkit into fontkit
...
Conflicts:
lib/font/table.coffee
lib/font/tables/cmap.coffee
lib/font/tables/glyf.coffee
lib/font/tables/head.coffee
lib/font/tables/hhea.coffee
lib/font/tables/hmtx.coffee
lib/font/tables/loca.coffee
lib/font/tables/maxp.coffee
lib/font/tables/name.coffee
lib/font/tables/os2.coffee
lib/font/tables/post.coffee
2014-11-27 20:51:58 -08:00
Devon Govett
7bab1db1a5
Support passing opentype features to text methods
2014-11-27 20:48:44 -08:00
Devon Govett
f7cc793693
Update fontkit API calls
2014-11-27 20:44:25 -08:00
Laszlo Balogh
18927a5d91
Fixed diminishing left-margin
2014-11-21 16:37:30 +00:00
Devon Govett
b36c548a0d
Merge pull request #308 from ef4/continued-breaker
...
Avoid unnecessarily breaking inside words when using `continued`
2014-09-15 14:05:52 -04:00
Devon Govett
38e5b73e58
Move TTF table tags to prototype
2014-09-15 11:35:42 -04:00
Devon Govett
2eb9fa3aa2
Merge branch 'master' of github.com:yelouafi/pdfkit into yelouafi-master
2014-09-15 11:32:13 -04:00
yelouafi
9f4c6345c5
Moved @tag definition to the derived Table constructors
2014-09-13 17:30:42 +00:00
yelouafi
c7c20ef6b7
removed @constructor.name line, corrected @tag params
2014-09-12 21:47:46 +00:00
Edward Faulkner
838afe15a0
Infinite loop when first word is longer than line
2014-09-12 16:25:12 -04:00
Edward Faulkner
1a5df016ce
Avoid unnecessarily breaking inside words when using continued
...
`continued` is implemented by temporarily shortening the lineWidth,
which can cause the linewrapper to break inside words when that's not
really necessary.
2014-09-12 15:11:56 -04:00
Devon Govett
95b149e16d
Minor style changes
2014-09-12 15:09:49 -04:00
Edward Faulkner
1c48bad333
bufferedPages support
2014-09-12 14:59:45 -04:00
yelouafi
7f8714a40f
TTFFont.parse should call *Table constructors with explicit @tag param
2014-09-12 18:34:44 +00:00
Devon Govett
8383dee3cb
Merge pull request #303 from ef4/blank-ascender
...
Prevent missing ascender from breaking layout
2014-09-11 21:05:09 -04:00
Devon Govett
33920c3f2a
Merge pull request #301 from ef4/center-spacing
...
Fix center-aligned character spacing
2014-09-11 19:51:10 -04:00
Edward Faulkner
3acfa5833d
prevent missing ascender from breaking layout
2014-09-11 19:31:21 -04:00
Edward Faulkner
3e19194802
Fix center-aligned character spacing
2014-09-11 16:09:54 -04:00
Edward Faulkner
5b433d808a
fix indent with continued
2014-09-11 13:34:51 -04:00
Devon Govett
09ed15b2e4
Fix unicode annotations
2014-08-29 11:49:20 -04:00
Devon Govett
3418299ac7
Merge pull request #277 from mishoo/fix-reading-uint32
...
Fix reading UInt32
2014-08-16 09:52:56 -04:00
Mihai Bazon
b60fe860e0
Fix reading UInt32
...
In JS, 0x80 << 24 yields a negative result. Also, 0x80000000|0 < 0.
Bitwise ops should be avoided for very long unsigned ints.
2014-08-16 11:57:54 +03:00
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
735cecb1f6
Add support for loading fonts from Uint8Array or ArrayBuffer
2014-08-10 11:02:20 -04:00
Devon Govett
65f40376cd
Merge branch 'master' into fontkit
...
Conflicts:
lib/font.coffee
2014-08-10 10:56:30 -04:00
Devon Govett
1241997715
Refactor font loading code and add support for ArrayBuffers
2014-07-29 09:42:48 -07:00
Aaron Fischer
c2c61bb2e2
added support for add font as Uint8Array
2014-07-29 09:15:39 -07:00
Devon Govett
0d882e0ef0
Remove old font parsing library
2014-07-19 12:51:38 -07:00
Devon Govett
f76f25bbd8
Remove unneeded import
2014-07-19 12:43:20 -07:00
Devon Govett
e58a7ce809
Formatting
2014-07-14 20:48:00 -07:00
jkol
64df00fa13
Added "valign" option to image "fit" scaling
...
valign can be set to "center" or "bottom" now and when "valign" === "center" is combined with "align" === "center" any aspect ratio image can be centered into a bounding area.
2014-07-14 18:23:11 -05:00
Devon Govett
8e10736ad6
Add kerning support for standard PDF fonts by parsing data in AFM files
2014-07-06 00:16:23 -07:00
Devon Govett
67b0d8da19
Add kerning support for embedded fonts
2014-07-06 00:15:59 -07:00
Devon Govett
163562c50a
Add support for kerning data to the text mixin
2014-07-06 00:15:31 -07:00
Devon Govett
0c5f818e23
Split PDFFont class into separate subclasses for embedded and standard fonts
2014-07-06 00:03:12 -07:00
Devon Govett
ac32a9316d
Add support for OpenType/CFF embedding and subsetting
2014-07-03 18:58:27 -07:00
Devon Govett
4ce53698c0
Replace font engine with new fontkit module
2014-07-03 18:57:36 -07:00
Devon Govett
6a2c306680
Don't include newlines in text fragments
2014-07-03 14:58:50 -07:00
Devon Govett
c81222fc99
Make PDFReference an actual Node stream so we can pipe stuff to it
2014-07-03 11:53:37 -07:00
Ryan Wersal
c77add8f56
Remove text state handling as it doesn't surive graphic stack saves/restores
...
Saving and/or restoring the graphics state causes each text object to have to
reinitialize that text state. As a result, the mode/characterSpacing commands
would not get re-added until their value(s) had changed.
2014-05-10 01:11:06 -05:00
Ryan Wersal
aadc589a62
Improve sizing of text underline
2014-05-09 00:05:17 -05:00
Ryan Wersal
acc0a2e4ba
Use a regex to capture the base64 encoded string
2014-05-06 00:43:02 -05:00
Ryan Wersal
2b34173dec
Add ability to add base64 URI images
2014-05-05 22:47:33 -05:00
Devon Govett
a6f6f4df8a
Don't use trimRight since it isn't supported in IE
2014-04-14 09:58:26 -07:00
Devon Govett
6e447cae7a
Don't embed fonts that haven't been referenced
2014-04-13 19:54:18 -07:00
Devon Govett
22499ee4bd
Include a static list of standard fonts so they can be included by browserify/brfs
2014-04-12 20:48:29 -07:00
Devon Govett
78946e97fc
Rework mixin so it can be statically compiled by browserify
2014-04-12 20:47:54 -07:00
Devon Govett
98489d64a8
Store the font name
2014-04-12 20:45:42 -07:00
Devon Govett
4b8b031188
Don't embed fonts until they are actually used
2014-04-12 20:45:15 -07:00
Devon Govett
bb9b77cb82
Allow loading fonts from Buffers in addition to filenames
2014-04-12 20:44:19 -07:00