53 Commits

Author SHA1 Message Date
Mike Morris
331fb5ffaf first draft of new proto spec with face metadata 2016-04-19 17:28:27 -04:00
Mike Morris
30b6e1b021 set sdf metadata as const static in glyphs.hpp 2016-04-19 17:23:27 -04:00
Mike Morris
c73d016353 add granularity 2016-04-19 17:23:27 -04:00
Mike Morris
eff4173c90 consitify braces and alignment 2016-04-19 17:23:27 -04:00
Mike Morris
eea416e6d9 add optional ascender and descender 2016-04-19 17:21:16 -04:00
Mike Morris
fc6f87708d handle null ft_face->style_name in RangeAsync 2016-01-12 11:27:23 -05:00
Mike Morris
f64eb5c938 handle ft_face->style_name null value
ft_face->style_name is optional in the TTF spec, we should properly
handle the null value case. This adds a font with a null style_name
property, an alternate constructor for FaceMetadata, and a test case to confirm style_name is only added to the JavaScript face if the string is not empty.
2016-01-11 17:26:37 -05:00
Mike Morris
ed9cde2cbe nan2
ignore -Wunused-local-typedef in boost
fix HandleScope and ignore -Wshadow in node.h
2015-10-16 16:25:46 -04:00
Mike Morris
a8aad572dc drop #undef B0 2015-07-09 16:09:42 -04:00
mattdesl
56136c5976 fixing bounds for short ranges 2015-05-07 15:06:37 -04:00
Dane Springmeyer
feb4a46acc shuffle includes: unordered_map is unused, cmath is 2015-03-23 17:35:55 -07:00
Dane Springmeyer
a92a35b04b silence boost warnings + fix header 2015-03-23 17:33:00 -07:00
Lauren Budorick
c493204b16 Fix leaks 2015-03-23 17:21:38 -07:00
Lauren Budorick
1b408bdd8f Memory leak fixes (wip) 2015-03-23 15:59:19 -07:00
Dane Springmeyer
7d39a04311 minor optimizations and refactoring
- avoid allocating std::string and instead keep alive the node.Buffer
   containing the in-memory font data and use a pointer to its memory
 - use RAII principles in baton structs for setting up and destroying persistent handles
2015-03-23 02:37:01 -07:00
Lauren Budorick
87fbd848ca Loading faces from memory: super slow? 2015-03-20 16:49:42 -07:00
Lauren Budorick
b773cff3da Use set for codepoints, closes #67 2015-03-20 12:07:51 -07:00
Lauren Budorick
c687172eab Change fontnik.range to wrap args into an options object 2015-03-20 11:38:32 -07:00
Dane Springmeyer
4b754af222 test coverage of invalid font files 2015-03-20 00:26:59 -07:00
Dane Springmeyer
90224b0706 ignore missing coverage for failed FT_Init_FreeType 2015-03-19 18:46:27 -07:00
Lauren Budorick
937d148295 delete delete delete 2015-03-19 17:58:31 -07:00
Dane Springmeyer
6b62495f91 node v0.12.x support 2015-03-19 11:07:49 -07:00
Dane Springmeyer
0bfaf034ee use emplace_back to construct objects in place 2015-03-19 00:01:17 -07:00
Dane Springmeyer
b6f8ab1743 Start passing back FaceMetadata 2015-03-18 23:49:15 -07:00
Dane Springmeyer
b564fba4de prep for handling multiface fonts + call FT_Done_Freetype 2015-03-18 23:33:44 -07:00
Dane Springmeyer
5cf9c94898 simplify + use more of Nan API in AfterLoad 2015-03-18 23:32:06 -07:00
Dane Springmeyer
b5205b128f req is not heap allocated so no need to delete 2015-03-18 23:30:30 -07:00
Dane Springmeyer
f59833196c pass file_name string to baton 2015-03-18 23:29:47 -07:00
Lauren Budorick
d4700c2654 .load compiling and crashing 2015-03-18 17:31:33 -07:00
Lauren Budorick
7934384493 Start load function 2015-03-17 17:29:29 -07:00
Dane Springmeyer
da6ed9e958 avoid abort - refs #64 2014-12-17 09:47:53 -08:00
Tom MacWright
5fe04f16ce Codepoints
This adds codepoints support to node-fontnik. A sync function called
`codepoints(str:facename)` returns an array of numbers indicating
Unicode code points covered by the font.
2014-07-10 12:34:22 -04:00
Tom MacWright
9556bee510 Copy some styles from
https://github.com/rvagg/nan/blob/master/test/cpp/settergetter.cpp
2014-06-10 23:04:20 -04:00
Tom MacWright
cd71d69149 continue nanification 2014-06-10 22:49:49 -04:00
Tom MacWright
a39d6b9779 Use NAN_METHOD for New 2014-06-10 17:41:26 -04:00
Tom MacWright
0b3ca836fa Test 0.8, use buffer abstraction 2014-06-10 14:41:51 -04:00
Tom MacWright
6b6a2e7a4f More NaN 2014-06-10 12:15:47 -04:00
Tom MacWright
4b848d2c39 Merge branch 'master' of github.com:mapbox/fontserver 2014-06-09 17:48:57 -04:00
Tom MacWright
10eadf5c71 First pass nanification. Refs #44 2014-06-09 17:48:50 -04:00
Mike Morris
b5d902dcac rename to fontnik, ref #35 2014-06-09 17:42:41 -04:00
Mike Morris
a786b1a41f extract node bindings from c++ library 2014-06-05 16:38:28 -04:00
Mike Morris
7fa979de9e revert ampnik/font_set, move fontstack trimming to glyphs.cpp 2014-06-04 15:53:37 -04:00
Mike Morris
47ed925671 remove fontserver/text_format 2014-06-04 15:29:17 -04:00
Mike Morris
5391a21e62 restore face.hpp and face.cpp to mapnik-ish, merge face_set back into face 2014-06-04 14:18:55 -04:00
Mike Morris
c686bca4f8 move files back to mapnik and node_mapnik namespaces 2014-06-02 19:29:40 -04:00
Mike Morris
b8b8915536 move headers to include/ directory 2014-06-02 18:35:54 -04:00
Mike Morris
465802bce7 move from font_face back to face 2014-06-02 17:26:26 -04:00
Mike Morris
9afa240fd4 rm cout debugging, FT stroker and vector_tile.proto 2014-06-02 15:48:28 -04:00
Mike Morris
c752aaee73 remove harfbuzz, icu and itemizer 2014-06-02 15:33:52 -04:00
Young Hahn
db8997f4c5 Now pass the test by switching to std vector. 2014-06-01 21:51:03 -04:00