src


Log

Author Commit Date CI Message
Behdad Esfahbod bbdd6fd2 2015-02-19T17:03:02 Minor simpilfy BEInt
Behdad Esfahbod 88a399ac 2015-02-19T16:57:12 Optimize IntType comparison to avoid branches for 16bit numbers
Behdad Esfahbod bd047d3b 2015-02-19T10:47:18 [layout] Minor
Behdad Esfahbod b9d3f605 2015-02-19T10:42:41 [layout] Minor
Behdad Esfahbod 37de2d53 2015-02-19T16:55:51 Minor simplify IntType
Behdad Esfahbod 758fb206 2015-02-18T13:45:03 Remove unused macro
Behdad Esfahbod 40c58923 2015-02-18T13:18:46 [layout] Refactor Lookup::dispatch()
Behdad Esfahbod 1a232213 2015-02-19T10:40:23 [layout] Don't check glyph props against lookup flags when recursing Shouldn't be needed. I have a hard time imagining this breaking any legitimate use case.
Behdad Esfahbod 095a1257 2015-02-19T10:29:41 [layout] Port sanitize() to use dispatch() Needed some rework of Extension table. Hopefully I got it right, and the new template usage doesn't break any compilers...
Behdad Esfahbod 70366f5d 2015-02-18T13:09:54 [layout] Refactor get_subtable()
Behdad Esfahbod f72f326a 2015-02-17T19:18:07 Minor
Behdad Esfahbod 8e36ccfd 2015-02-17T19:15:34 [layout] Use dispatch() for add_coverage()
Behdad Esfahbod 50b8dc79 2015-02-17T18:14:17 [layout] Add may_dispatch() No functional change right now.
Behdad Esfahbod 6b599dac 2015-02-17T16:04:07 Remove unnecessary check in sanitize
Behdad Esfahbod 365576d2 2015-01-29T13:59:42 [layout] Allocate iters in the context Can be further optimized, but I think I didn't break anything. Saves another 3% off Roboto shaping.
Behdad Esfahbod de2118ed 2015-02-17T17:27:44 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...
Behdad Esfahbod 6759ed95 2015-02-17T16:05:30 Minor
Behdad Esfahbod 514564f5 2015-01-29T13:48:48 [layout] Move skippy_iter setup from constructor into init()
Behdad Esfahbod b051be54 2015-01-29T13:40:39 [lookup] Add skippy_iter.reset() Towards reducing the cost of initializing skippy_iter()
Behdad Esfahbod 2cecc38c 2015-01-29T13:32:05 [layout] Shuffle code around
Behdad Esfahbod 69626698 2015-01-29T13:08:41 [layout] Merge forward and backward iterators
Behdad Esfahbod 1f038eec 2015-01-29T13:05:25 [layout] Fix backward reject() Has no functional effect since reject was never used with match_glyph_data.
Behdad Esfahbod 37d13acd 2015-01-29T11:38:01 [layout] Remove some unnecessary checks in skippy
Behdad Esfahbod baa14e18 2015-01-29T11:08:43 [lookup] Don't initialize skippy if coverage match fails Currently: - Initializing skippy is very expensive, - Our lookup accelerator (using set-digests) can be very ineffecite, As such, we end up many times initializing skippy but then failing coverage check. Reordering fixes that. When, later, we fix our accelerator to have truly small false-positive rate (for example by using the frozen-sets), then we might want to reorder these checks such that we wouldn't calculate coverage number if skippy is going to fail. This shows a 5% speedup with Roboto already.
Behdad Esfahbod 7788993b 2015-01-28T23:01:12 [layout] Use setter method to set c->lookup_props
Behdad Esfahbod f4ee48fd 2015-01-28T22:53:54 [layout] Remove unused wrapper method
Behdad Esfahbod 7b7129c7 2015-01-28T21:46:07 Add hb_frozen_set_t I experimented with replacing use of hb_set_digest_t with this new hb_frozen_set_t, hoping to get a huge speedup for busy lookups (like kern lookup in Roboto), but I only got 6% speendup in Roboto and 4% in NotoNastaliqUrduDraft :(.
Behdad Esfahbod 241eac95 2015-01-28T20:55:42 Hide internals of lookup accelerators
Konstantin Ritt 9768e651 2015-02-14T00:58:51 Fix build with MSVC on CE This code is C++ only. There isn't a single C++ compiler that fails to understand the "inline" keyword, since it's required by C++98. Any compiler older than C++98 is likely to choke on the template usage further down, so this isn't necessary. Moreover, the C++ standard says you cannot define macros. [lib.macro.names] says "Nor shall such a translation unit define macros for names lexically identical to keywords." -- technically, it's a promise that the Standard Library headers won't do it, the wording means that the entire translation unit won't do it, which implies no source can do it. MSVC complains about it: fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. Author: Thiago Macieira <thiago.macieira@intel.com>
Behdad Esfahbod 7888a6b0 2015-01-28T12:40:40 [ft] Handle negative scales with vertical writing
Behdad Esfahbod 982d94ea 2015-01-28T10:51:33 [coretext] Don't generate notdef glyph for default-ignorables As discovered on Chrome Mac: https://code.google.com/p/chromium/issues/detail?id=452326
Behdad Esfahbod 6917a045 2015-01-28T10:43:32 [coretext] Unbreak glyph positioning in presence of notdef runs As discovered on Chrome Mac: https://code.google.com/p/chromium/issues/detail?id=452326 This was originally broken in: commit 5a0eed3b50629be4826e4e9428f2c3255195395d Author: Behdad Esfahbod <behdad@behdad.org> Date: Mon Aug 11 23:47:16 2014 -0400 [coretext] Implement vertical shaping
Behdad Esfahbod 1eff4350 2015-01-27T12:26:04 Minor optimization
Konstantin Ritt 675956ac 2015-01-27T11:23:07 Do not leak hb_language_t on hb_language_item_t destruction
Konstantin Ritt b306f967 2015-01-27T20:08:41 Minor improvement to HB_SHAPER_DATA_DESTROY
Behdad Esfahbod 61820bc4 2015-01-26T14:25:52 [API] Add hb_buffer_add_latin1() This is by no ways to promote non-Unicode encodings. This is an entry point that takes Unicode codepoints that happen to all be the first 256 characters and hence fit in 8bit strings. This is useful eg in Chrome where strings that can fit in 8bit are implemented that way, and this avoids copying into UTF-8 or UTF-16. Perhaps we should rename this to hb_buffer_add_codepoints8(). I'm also curious if anyone would be really interested in hb_buffer_add_codepoints16(). Please discuss!
Behdad Esfahbod 78c6e86c 2015-01-26T14:08:36 Fix hb_buffer_add_codepoints to actually NOT validate
Konstantin Ritt f3537b62 2015-01-25T09:50:51 Move some code around Just to keep Windows specific workarounds in a single place.
Konstantin Ritt afb62d88 2015-01-25T08:16:26 Do not define MemoryBarrier on WinCE There is a _HBMemoryBarrier() wrapper function that emulates MemoryBarrier() behavior when it is not defined.
Konstantin Ritt 7db326a1 2015-01-25T08:13:24 Fix build on WinRT There is no environment (like WinCE) and the basic version of InitializeCriticalSection is unsupported. https://codereview.qt-project.org/#/c/92496/
Behdad Esfahbod a319d077 2015-01-23T12:44:24 [ft] Handle negative x_scale / y_scale
Behdad Esfahbod b0b38bb8 2015-01-21T19:19:33 [coretext] Fix positioning of notdef
Behdad Esfahbod 70622e50 2015-01-21T18:50:57 [coretext] Fix scaling Before we were not accounting for possible differences in x_scale and y_scale, as well as the signs of those. All should be in good shape now.
Behdad Esfahbod 221ba02b 2015-01-21T16:42:09 [coretext] Use vertical advance for notdef in vertical direction
Behdad Esfahbod 7988da24 2015-01-21T18:33:50 Add convenience make target "make lib" in src/
Behdad Esfahbod 67dfa8c7 2015-01-19T17:00:31 When matching second glyph of kerning pairs, use bsearch Roboto has glyphs (like 'F') that have 200 kerning pairs. Add a handcoded bsearch instead of previous linear search. This doesn't show much speedup though, apparently we spend the bulk of the time somewhere before here.
Behdad Esfahbod e9f5c65b 2015-01-19T14:42:11 [bindings] Minor
Roozbeh Pournader 5eb939dd 2015-01-18T14:30:08 Change New Tai Lue shaping engine from SEA to default This is to reflect the UTC decision to change the encoding model of New Tai Lue from logical to visual to be similar to Thai, Lao, and Tai Viet: http://www.unicode.org/L2/L2014/14250.htm#141-C26 The visual encoding is already the current practice of encoding New Tai Lue on the web anyway: http://www.unicode.org/L2/L2014/14195-newtailue.txt Fixes behdad/harfbuzz#66.
Behdad Esfahbod 1aaa7d67 2015-01-17T20:16:56 [indic] Fix out-of-bounds access
Behdad Esfahbod 238d6a38 2015-01-07T10:51:44 [bindings] Update sample.py
Behdad Esfahbod 2cd53235 2015-01-06T19:16:38 [bindings] Use hb_glib_blob_create() in sample hb_blob_create() is considered C-only API.
Behdad Esfahbod 0ef179e2 2015-01-06T16:58:33 [glib] Add hb_glib_blob_create() that takes GBytes
Behdad Esfahbod b91904a4 2015-01-06T15:43:14 [bindings] Replace deprecated allow-none with optional and nullable
Behdad Esfahbod 81a31f3e 2015-01-06T15:37:31 [bindings] Make sample Python 2/3 compatible
Behdad Esfahbod b632e799 2015-01-06T14:05:26 Fix up gobject-introspection a bit Minimal shaping works now!
Chris Peterson fb85d618 2015-01-04T19:31:10 Add #ifdef HB_USE_ATEXIT to fix -Wunused-function warnings
Chris Peterson d1897a98 2015-01-03T19:46:19 Fix hb_atomic_ptr_cmpexch -Wunused-value warnings
Behdad Esfahbod f34aaba8 2014-12-28T18:56:15 [ft] Don't set font ppem For discussion see: http://lists.freedesktop.org/archives/harfbuzz/2012-April/001905.html Over time we have had added NO_HINTING all over the place in hb-ft. Finish it off. Not setting ppem on hb-font disables get_contour_point() calls which is good anyway. See comments in the commit.
Behdad Esfahbod 350f3a02 2014-12-28T17:44:26 [ft] Add hb_ft_face_create_referenced() and hb_ft_font_create_referenced() When I originally wrote hb-ft, FreeType objects did not support reference counting. As such, hb_ft_face_create() and hb_ft_font_create() had a "destroy" callback and client was responsible for making sure FT_Face is kept around as long as the hb-font/face are alive. However, since this was not clearly documented, some clienets didn't correctly did that. In particular, some clients assumed that it's safe to destroy FT_Face and then hb_face_t. This, indeed, used to work, until 45fd9424c723f115ca98995b8f8a25185a6fc71d, which make face destroy access font tables. Now, I fixed that issue in 395b35903e052aecc97d0807e4f813c64c0d2b0b since the access was not needed, but the problem remains that not all clients handle this correctly. See: https://bugs.freedesktop.org/show_bug.cgi?id=86300 Fortunately, FT_Reference_Face() was added to FreeType in 2010, and so we can use it now. Originally I wanted to change hb_ft_face_create() and hb_ft_font_create() to reference the face if destroy==NULL was passed in. That would improve pretty much all clients, with little undesired effects. Except that FreeType itself, when compiled with HarfBuzz support, calls hb_ft_font_create() with destroy==NULL and saves the resulting hb-font on the ft-face (why does it not free it immediately?). Making hb-face reference ft-face causes a cycling reference there. At least, that's my current understanding. At any rate, a cleaner approach, even if it means all clients will need a change, is to introduce brand new API. Which this commit does. Some comments added to hb-ft.h, hoping to make future clients make better choices. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=75299
Behdad Esfahbod 9a3b7488 2014-12-28T17:27:39 Remove redundant check for FT_Face_GetCharVariantIndex We require FreeType >= 2.8.3. This symbol was introduced earlier than that.
Behdad Esfahbod affacf2f 2014-12-28T16:20:31 [ft] Open blob in READONLY mode HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE is deprecated and fairly useless now.
Behdad Esfahbod 395b3590 2014-12-28T16:03:26 Avoid accessing layout tables at face destruction "Fixes" https://bugs.freedesktop.org/show_bug.cgi?id=86300 Based on discussion someone else who had a similar issue, most probably the user is releasing FT_Face before destructing hb_face_t / hb_font_t. While that's a client bug, and while we can (and should) use FreeType refcounting to help avoid that, it happens that we were accessing the table when we didn't really have to. Avoid that.
Behdad Esfahbod 7d5e7613 2014-12-18T18:22:21 Fail blob creation if length overflows or is too large Fail if blob start plus length overflows; or if blob length is greater than 2GB. It takes a while for fonts to get to that size. In the mean time, it protects against bugs like this: http://www.icu-project.org/trac/ticket/11450 Also avoids some weird issues with 32bit vs 64bit systems as we accept length as unsigned int. As such, a length of -1 will cause overflow on 32bit machines, but happily accepted on a 64bit machine. Avoid that.
Behdad Esfahbod d5a50520 2014-12-18T18:09:41 Assert that blob length doesn't overflow address. This will crash now, if blob was created with wrong length. Check for that coming next commit.
Behdad Esfahbod 093c520d 2014-12-12T21:07:53 [otlayout] Mark variables that are C arrays as opposed to OT::ArrayOf
Behdad Esfahbod 9df0a520 2014-12-12T20:54:28 [otlayout] Avoid invalid access with Context format 3
Behdad Esfahbod 295ef1dd 2014-12-12T20:43:18 [ot] Debug get_coverage
Behdad Esfahbod 00f6a8e3 2014-12-12T20:36:49 [ot] Print format in dispatch trace
Behdad Esfahbod 5c7d6f02 2014-12-12T20:28:49 Minor
Behdad Esfahbod 153beebb 2014-12-12T19:46:09 [ot] Make sure all toplevel tables have tableTag
Behdad Esfahbod 282b13f9 2014-12-12T19:32:46 [sanitize] Improve debug output some more
Behdad Esfahbod 0766ee1f 2014-12-12T18:23:20 [sanitize] Improve debug output
Behdad Esfahbod e6f80fa1 2014-12-10T12:05:24 [indic] Allow ZWJ/ZWNJ before SM In Oriya, a ZWJ/ZWNJ might be added before candrabindu to encourage or stop ligation of the candrabindu. This is clearly specified in the Unicode section on Oriya. Allow it there. Note that Uniscribe doesn't allow this. Micro tests added using Noto Sans Oriya draft. No changes in numbers. Currently at: BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%) DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%) GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%) GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%) KANNADA: 951190 out of 951913 tests passed. 723 failed (0.0759523%) KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%) MALAYALAM: 1048147 out of 1048334 tests passed. 187 failed (0.0178378%) ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%) SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%) TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%) TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
Behdad Esfahbod fde3e4a4 2014-10-29T11:23:08 In hb_ot_collect_glyphs(), don't recurse to a lookup more than once Otherwise, we might process a lookup thousands of times, with no benefit. This pathological case was hit by Noto Nastaliq Urdu Draft in Firefox's code to determine whether space glyph is involved in any GSUB/GPOS rules. A test page is at http://behdad.org/urdu See: https://bugzilla.mozilla.org/show_bug.cgi?id=1090869
Behdad Esfahbod 5a5640d8 2014-10-14T21:26:13 Move code around
Behdad Esfahbod 666b42f7 2014-10-14T21:24:59 Move macros around Fixes https://bugs.freedesktop.org/show_bug.cgi?id=84491
Behdad Esfahbod 5c87120b 2014-10-14T20:07:31 Fix misc warnings Fixes https://github.com/behdad/harfbuzz/pull/51
Behdad Esfahbod 8afaf096 2014-10-02T16:40:41 [ft] Add NO_HINTING in a couple other places
Behdad Esfahbod 5de04073 2014-10-01T18:18:25 Help clang with gcov
Behdad Esfahbod c0b82ba3 2014-10-01T14:24:07 Create ragel-generated files in srcdir
Behdad Esfahbod 79bbb10b 2014-10-01T13:33:21 Clean ragel-generated headers in maintainercleanfiles
Behdad Esfahbod 8971cac8 2014-10-01T12:41:03 Don't use tmp files in Makefile Useful for code-coverage generation of the ragel-generated files as they will now contain the correct .hh filename in them.
Behdad Esfahbod 22723186 2014-10-01T11:56:07 check-static-inits: Filter out zero-length sections When compiling with -O0, zero-sized constructors were showing up and confusing the test.
Behdad Esfahbod b695a3dc 2014-10-01T11:55:14 check-static-inits: check for static finalizers
Behdad Esfahbod 250398b1 2014-10-01T11:28:01 Hide other bubble-sort
Behdad Esfahbod c1e87442 2014-10-01T11:07:08 Hide bubble-sort!
Behdad Esfahbod 15685299 2014-09-25T17:45:49 [ot-font] Add hb_ot_face_cmap_accelerator_t
Behdad Esfahbod d088ccaf 2014-09-25T17:26:56 [ot-font] Minor
Behdad Esfahbod d7c160a1 2014-09-25T17:15:35 [ot-font] Handle missing vertical metrics tables
Behdad Esfahbod be1cca27 2014-09-25T16:53:24 [ot-font] Add metrics_accel_t
Behdad Esfahbod d41b809e 2014-09-25T13:04:08 [ot-font] Start adding vertical support
Behdad Esfahbod 22f0de50 2014-08-25T12:54:57 Fix build
Behdad Esfahbod d457e3f0 2014-08-25T12:31:19 [arabic] Don't #include __FILE__ Fine! https://code.google.com/p/chromium/issues/detail?id=406957
Behdad Esfahbod 9ceb673d 2014-08-25T11:48:12 [arabic] Allow disabling win1256 fallback code By defining HB_NO_WIN1256.
Behdad Esfahbod 8a931950 2014-08-22T12:06:57 [ot] Prefer Windows platform cmap tables / accept all Unicode encodingIDs Some fonts on the Mac ship with (0,1).
Behdad Esfahbod 270971a0 2014-08-15T14:28:04 [win32] Avoid preprocessor warnings re macros
Behdad Esfahbod 8c6bd34d 2014-08-14T13:33:37 Fix check-symbols on OS X
Behdad Esfahbod 522b1cc5 2014-08-14T13:29:30 [coretext] Hide feature_mappings
Behdad Esfahbod 0d2c2f23 2014-08-14T13:25:55 Simplify hb-object
Behdad Esfahbod 9d861b81 2014-08-14T13:15:21 Really fix clang build this time