Commit Graph

7010 Commits

Author SHA1 Message Date
Khaled Hosny
d2b20ba18d [appveyor] Build on Cygwin and msys2 in parallel 2018-10-24 17:27:28 +02:00
Khaled Hosny
0d2fa7fd4c [appveyor] Do not update msys2
Looks like AppVeyor has new enough packages for our needs. Cuts CI build
time by 5 minutes.
2018-10-24 17:27:28 +02:00
Khaled Hosny
6a3ad24560 [appveyor] Organize config file a bit 2018-10-24 17:27:28 +02:00
Khaled Hosny
0cd7d041d8 [appveyor] Don’t build branches with open PR twice 2018-10-24 17:27:28 +02:00
Behdad Esfahbod
401cdf0792 [ot-font] Fix sign of ascent/descent
Some fonts, like msmincho, have positive number as descent
in vhea table.  That's wrong.  Just enforce sign on ascent/descent
when reading both horizontal and vertical metrics.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1248
2018-10-23 17:00:49 -07:00
Behdad Esfahbod
ba502dea1e [morx] Fix cluster-merging when ligating
Only merge when actual ligature happened.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1305
2018-10-23 16:50:31 -07:00
Garret Rieger
aa5af8d041 Fix size calculation in DEFINE_SIZE_ARRAY_SIZED. 2018-10-23 16:04:21 -07:00
Behdad Esfahbod
f33ad6d692 [aat] Fix up previous commit and add files 2018-10-23 14:31:51 -07:00
Behdad Esfahbod
ffe3478448 [aat] Allow enabling/disabling features
Only works at entire-buffer range, not sub-ranges.

Test with:

$ hb-shape Zapfino.dfont Zapfino
[Z_a_p_f_i_n_o=0+2333]

$ hb-shape Zapfino.dfont Zapfino --features=-dlig
[Z=0+416|a=1@-21,0+264|p_f=2+433|i=4+181|n=5+261|o=6+250]

$ hb-shape Zapfino.dfont Zapfino --features=+dlig
[Z_a_p_f_i_n_o=0+2333]

Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 14:14:03 -07:00
Behdad Esfahbod
8be0e5fd45 [ot-map] Minor 2018-10-23 13:39:50 -07:00
Behdad Esfahbod
e8fccbc36b Minor 2018-10-23 13:25:03 -07:00
Behdad Esfahbod
76324d95ca Shift code around 2018-10-23 13:09:30 -07:00
Behdad Esfahbod
cf92d6579e [trak] Allow disabling tracking for ranges of text
Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 03:10:56 -07:00
Behdad Esfahbod
8869436cb8 When parsing feature ranges, accept ';' instead of ':' 2018-10-23 03:07:48 -07:00
Ebrahim Byagowi
22ecefd88e Make tracking optout possible using 'trak' ot feature
So '--features=-trak' or 'font-feature-settings: 'trak' 0;' can prevent
applying of tracking if used.
2018-10-23 02:57:55 -07:00
Behdad Esfahbod
6d40eb8372 Touch up on previous commit
https://github.com/harfbuzz/harfbuzz/pull/1273
2018-10-23 02:51:42 -07:00
David Corbett
205737acdc [use] Prohibit visually ambiguous vowel sequences 2018-10-23 02:25:08 -07:00
Behdad Esfahbod
48ed598a35 [VORG] Hook up to hb-ot-font's v_origin
Fixes https://github.com/harfbuzz/harfbuzz/issues/544

Test added with NotoSansCJK, eg. with U+FF38.
2018-10-23 02:21:27 -07:00
Behdad Esfahbod
097ecfd4a9 [VORG] Add get_y_origin()
Unhooked.
2018-10-23 02:09:42 -07:00
Behdad Esfahbod
6fb24d5e3e [VORG] Add VORG table
Cherry-picked from cff-subset branch.
2018-10-23 01:59:43 -07:00
Behdad Esfahbod
531f9822b2 [morx] Add a few debug messages to Ligature chain 2018-10-23 01:32:08 -07:00
Behdad Esfahbod
0e5bcdef7f [morx] Clear stack upon underflow when acting ligatures 2018-10-23 00:39:44 -07:00
Behdad Esfahbod
1bfb96a9c8 [test/text-rendering-tests] Update from upstream 2018-10-22 23:41:47 -07:00
Behdad Esfahbod
792071de40 [morx] Leave ligature on stack after ligating
Test with Apple Color Emoji.ttf of ~66MB and following sequence:

./hb-shape Apple\ Color\ Emoji-old.ttf --font-funcs=ot -u U+1F468,200d,U+1F469,200d,U+1F467,200d,1f466

Should form full family if matching works correctly.  It first makes
family of three, then makes family of four out of that and the last
two characters.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1292
2018-10-22 23:38:34 -07:00
Ebrahim Byagowi
e1b8e933f0
[ci] Disable llvm-gcc
#define Null(Type) Null<typename hb_remove_const<typename hb_remove_reference<Type>::value>::value>()

raises:
  hb-blob.cc: In function 'hb_blob_t* hb_blob_get_empty()':
  hb-blob.cc:194: error: using 'typename' outside of template
  hb-blob.cc:194: error: using 'typename' outside of template

Removing "typename"s fixes the issue but makes newer compiler fail apparently.

Probably downstream can patch that locally till we get a solution.
2018-10-23 09:23:48 +03:30
Behdad Esfahbod
8c78ced95b Unbreak builds 2018-10-22 21:49:42 -07:00
Behdad Esfahbod
8d689f8a7b Add hb_array<>() specialization for UnsizedArrayOf
Related https://github.com/harfbuzz/harfbuzz/issues/1301
2018-10-22 21:33:18 -07:00
Behdad Esfahbod
abfbba1911 Add hb_array<>()
Simplifies transient object creation.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1301
2018-10-22 21:27:45 -07:00
Behdad Esfahbod
17ffbc070f [color] Use Index for colorIdx
Doesn't matter, but matches the description.
2018-10-22 21:22:25 -07:00
Behdad Esfahbod
07386ea410 Remove const and references when binding Null()
Fixes https://github.com/harfbuzz/harfbuzz/issues/1299

Removes anomaly I was seeing in cpal table trying to use implicit Null(NameID).
2018-10-22 21:21:17 -07:00
Behdad Esfahbod
b18acab7bc [color] Add HB_COLOR
Normally I would have added to_string / from_string like other types
have.  But since we don't use hb_color_t much, I'm not going to do that.
Although, if we did, we could use it in hb-view to parse colors...
2018-10-22 18:20:57 -07:00
Behdad Esfahbod
228f96c9d0 [color] Finish reviewing / revamping CPAL
Now to hb_color_t.
2018-10-22 16:55:12 -07:00
Behdad Esfahbod
683fad0627 [color] Minor 2018-10-22 16:35:03 -07:00
Behdad Esfahbod
14474d2104 [color] Rely on CPALV1Tail Null object 2018-10-22 16:31:13 -07:00
Behdad Esfahbod
d7865107ea Remove const from hb_array_t details
Will come in through <T> if desired.
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
f3336580dd [color] Use hb_array_t in CPAL
Doesn't work though, ouch :(.  Need to figure out if it's unreasonable
to expect Null(T) inside hb_array_t<T> to see the later specialization
of Null for NameID.
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
5ae18855d1 [color] Check for null CPAL arrays
We cannot use a nullable offset here though.
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
69ab72e4aa [color] More CPAL rename 2018-10-22 16:24:16 -07:00
Behdad Esfahbod
0befb06c46 [color] More CPAL rename 2018-10-22 16:24:16 -07:00
Behdad Esfahbod
3600d20603 [color] Rename vars in CPAL 2018-10-22 16:24:16 -07:00
Ebrahim Byagowi
0babf761c9
Adopt dump-emoji with latest unreleased APIs changes (#1297) 2018-10-23 01:33:45 +03:30
Behdad Esfahbod
7997144b5f [color] Revamp palette API 2018-10-22 14:22:31 -07:00
Behdad Esfahbod
3bf91bd269 [color] Rewrite colr access
COLR table has one function: return layers for a glyph, and we expose exactly
that, so should just wire it through.  Also use sub_array() for verifiable
safety.

Also, BaseGlyphRecord's null object is enough.  We don't need to special-case
the not-found.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod
1de17bdb80 [colr] Add hb_ot_color_layer_t
We never return parallel arrays from functions.  That's inconvenient
and hard to bind.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod
3b3668acc8 [color] Rename / reorder a bit
Implement has_data() for realz.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod
9085a72deb [cpal] Touch up palette flags 2018-10-22 13:03:29 -07:00
Behdad Esfahbod
ee11fae9d0 [color] Rename "gid" to "glyph"
We don't expose "gid" in API.
2018-10-22 13:03:29 -07:00
Behdad Esfahbod
228fa71bf9 [colr] Move sanitize 2018-10-22 13:03:29 -07:00
Ebrahim Byagowi
d440c8d3fb
Add chromacheck Emoji test fonts and minor preparations (#1294) 2018-10-22 22:07:59 +03:30
Behdad Esfahbod
b92b9d7e52 [colr] Move compare function into a static
Not sure if MSVC would be unhappy about this.
2018-10-22 10:17:31 +02:00