Commit Graph

26 Commits

Author SHA1 Message Date
Behdad Esfahbod 23335deaad [ot-font] Accelerate cmap format4 get_glyph 2016-02-24 20:27:13 +09:00
Behdad Esfahbod 5473ebfb84 [ot-font] Remove level of indirection in get_glyph_variant 2016-02-24 19:32:43 +09:00
Behdad Esfahbod b47159011c Define return_trace()
Not functional change (expected!).
2015-09-29 14:57:02 +01:00
Behdad Esfahbod de2118ed7a Make sanitize() a const method
This makes a lot of code safer.  We only try modifying the object in one
place, after making sure it's safe to do so.  So, do a const_cast<> in
that one place...
2015-02-25 15:43:28 -08:00
Behdad Esfahbod 7627100f42 Mark unsigned integer literals with the u suffix
Simplifies hb_in_range() calls as the type can be inferred.
The rest is obsessiveness, I admit.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod af528b6674 Fix typo; ouch! 2014-06-27 18:07:00 -04:00
Behdad Esfahbod 7d4ada66c9 Mark unsed members with a "Z" suffix
There may be more.  There are members that are by definition
redundant or reserved and not needed, NOT what we *currently*
don't use.

I'm sure there's more...
2014-06-27 17:32:56 -04:00
Behdad Esfahbod a5a4736916 [cmap] Implement subtable format 14 2014-06-27 17:22:31 -04:00
Behdad Esfahbod 41ea594950 Minor: Remove LongSortedArrayOf 2014-06-27 15:23:18 -04:00
Behdad Esfahbod 9da552dcc5 Minor: Remove some GenericXXX templates 2014-06-27 15:18:36 -04:00
Behdad Esfahbod 36073ede5b Minor: Reorder template parameter order 2014-06-27 15:18:26 -04:00
Behdad Esfahbod df554af99d Rename search() to bsearch() and lsearch()
Such that the complexity of the algorithm used is clear at
call site.
2014-06-19 15:39:18 -04:00
Behdad Esfahbod f1a72fe7bf [ot-font] Fix cmap EncodingRecord cmp order 2014-06-04 19:03:16 -04:00
Behdad Esfahbod ce34f0b07e [ot-font] Use binary search for format12 cmap subtable 2014-06-04 18:57:46 -04:00
Behdad Esfahbod 257d1adfa1 [ot-font] Work around broken cmap subtable format 4 length
Roboto was hitting this.  FreeType also has pretty much the
same code for this, in ttcmap.c:tt_cmap4_validate():

    /* in certain fonts, the `length' field is invalid and goes */
    /* out of bound.  We try to correct this here...            */
    if ( table + length > valid->limit )
    {
      if ( valid->level >= FT_VALIDATE_TIGHT )
        FT_INVALID_TOO_SHORT;

      length = (FT_UInt)( valid->limit - table );
    }
2014-06-04 18:47:55 -04:00
Behdad Esfahbod 500737e8e1 [ot-font] Don't select a Null cmap subtable
Can happen either in broken fonts, or as a result of sanitize().
2014-06-04 18:17:29 -04:00
Behdad Esfahbod c95587618c [ot] Minor note re cmap subtable format 2 and 8 2014-05-14 00:42:18 -04:00
Behdad Esfahbod b7878cd58e [ot] Implement cmap subtable format 0 2014-05-13 21:47:51 -04:00
Behdad Esfahbod ca7b77431d [ot] Factor out code between cmap sutable format 12 and 13 2014-05-13 21:26:34 -04:00
Behdad Esfahbod 94759e8219 [ot] Factor out code between cmap subtable format 6 and 10 2014-05-13 21:19:49 -04:00
Behdad Esfahbod 91bbfca875 [ot] Implement cmap subtable formats 6 and 10 2014-05-12 18:19:29 -04:00
Behdad Esfahbod d294a2cb16 [ot] Implement cmap subtable format 13 2014-05-12 17:58:31 -04:00
Behdad Esfahbod 0d75793fae [ot] Implement cmap subtable format 12 2014-05-12 17:51:15 -04:00
Behdad Esfahbod 3608a6847e [ot] Hook up cmap table to hb_ot_font_funcs() 2014-05-12 13:46:29 -04:00
Behdad Esfahbod c8a4745299 [ot] Implement cmap subtable format 4 2014-05-09 19:55:51 -04:00
Behdad Esfahbod 41ca1fbebf [ot] Start implementing cmap table 2014-05-09 15:35:56 -04:00