From 4b524cd9449699e546a0991326d12ee2c915fab3 Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Tue, 3 Nov 2015 20:24:15 +0900 Subject: [PATCH] Imported Upstream version 0.9.40 Change-Id: Ifcc6c10a445fb0c0cc5bfee7638d67eb05a63a4c --- Android.mk | 3 +- ChangeLog | 2249 +++++++++++++++-- Makefile.am | 2 + Makefile.in | 2 + NEWS | 61 + README | 3 + README.python | 26 + autogen.sh | 9 +- config.h.in | 3 - configure | 60 +- configure.ac | 14 +- docs/Makefile.am | 2 + docs/Makefile.in | 2 + docs/reference/html/annotation-glossary.html | 9 +- docs/reference/html/ch01.html | 2 +- docs/reference/html/harfbuzz-hb-blob.html | 94 +- docs/reference/html/harfbuzz-hb-buffer.html | 130 +- docs/reference/html/harfbuzz-hb-common.html | 34 +- docs/reference/html/harfbuzz-hb-coretext.html | 4 +- docs/reference/html/harfbuzz-hb-face.html | 54 +- docs/reference/html/harfbuzz-hb-font.html | 180 +- docs/reference/html/harfbuzz-hb-ft.html | 12 +- docs/reference/html/harfbuzz-hb-glib.html | 6 +- docs/reference/html/harfbuzz-hb-graphite2.html | 4 +- docs/reference/html/harfbuzz-hb-icu.html | 6 +- docs/reference/html/harfbuzz-hb-ot-layout.html | 40 +- docs/reference/html/harfbuzz-hb-ot-tag.html | 6 +- docs/reference/html/harfbuzz-hb-set.html | 76 +- docs/reference/html/harfbuzz-hb-shape-plan.html | 30 +- docs/reference/html/harfbuzz-hb-shape.html | 16 +- docs/reference/html/harfbuzz-hb-unicode.html | 84 +- docs/reference/html/harfbuzz-hb-uniscribe.html | 4 +- docs/reference/html/harfbuzz-hb-version.html | 8 +- docs/reference/html/harfbuzz.devhelp2 | 2 +- docs/reference/html/index.html | 2 +- docs/reference/html/index.sgml | 2 +- docs/reference/version.xml | 2 +- src/Makefile.am | 46 +- src/Makefile.in | 56 +- src/check-defs.sh | 2 +- src/check-libstdc++.sh | 14 +- src/check-static-inits.sh | 4 +- src/check-symbols.sh | 10 +- src/gen-indic-table.py | 2 +- src/hb-blob.cc | 9 +- src/hb-buffer-deserialize-json.hh | 62 +- src/hb-buffer-deserialize-json.rl | 4 +- src/hb-buffer-deserialize-text.hh | 72 +- src/hb-buffer.cc | 42 +- src/hb-buffer.h | 8 + src/hb-common.cc | 5 +- src/hb-coretext.cc | 75 +- src/hb-face-private.hh | 2 +- src/hb-ft.cc | 77 +- src/hb-ft.h | 59 +- src/hb-glib.cc | 11 + src/hb-glib.h | 3 + src/hb-icu.cc | 4 +- src/hb-mutex-private.hh | 4 + src/hb-object-private.hh | 107 +- src/hb-open-file-private.hh | 17 +- src/hb-open-type-private.hh | 176 +- src/hb-ot-cmap-table.hh | 35 +- src/hb-ot-font.cc | 205 +- src/hb-ot-head-table.hh | 6 +- src/hb-ot-hhea-table.hh | 68 +- src/hb-ot-hmtx-table.hh | 40 +- src/hb-ot-layout-common-private.hh | 97 +- src/hb-ot-layout-gdef-table.hh | 30 +- src/hb-ot-layout-gpos-table.hh | 301 +-- src/hb-ot-layout-gsub-table.hh | 185 +- src/hb-ot-layout-gsubgpos-private.hh | 465 ++-- src/hb-ot-layout-jstf-table.hh | 12 +- src/hb-ot-layout-private.hh | 8 +- src/hb-ot-layout.cc | 109 +- src/hb-ot-maxp-table.hh | 6 +- src/hb-ot-name-table.hh | 8 +- src/hb-ot-shape-complex-arabic-fallback.hh | 4 +- src/hb-ot-shape-complex-arabic-win1256.hh | 6 +- src/hb-ot-shape-complex-indic-machine.hh | 2620 ++++++++++---------- src/hb-ot-shape-complex-indic-machine.rl | 2 +- src/hb-ot-shape-complex-indic-table.cc | 36 +- src/hb-ot-shape-complex-myanmar-machine.hh | 38 +- src/hb-ot-shape-complex-private.hh | 2 +- src/hb-ot-shape-complex-sea-machine.hh | 34 +- src/hb-ot-shape-fallback.cc | 4 +- src/hb-ot-shape-normalize.cc | 9 +- src/hb-ot-shape.cc | 2 +- src/hb-private.hh | 145 +- src/hb-set-private.hh | 59 +- src/hb-shape.cc | 6 +- src/hb-shaper-private.hh | 7 +- src/hb-shaper.cc | 4 +- src/hb-unicode.cc | 2 +- src/hb-uniscribe.cc | 6 + src/hb-utf-private.hh | 57 +- src/hb-version.h | 4 +- test/api/test-blob.c | 3 + test/shaping/Makefile.am | 1 + test/shaping/Makefile.in | 4 +- .../5028afb650b1bb718ed2131e872fbcce57828fff.ttf | Bin 0 -> 4720 bytes test/shaping/fonts/sha1sum/MANIFEST | 1 + test/shaping/hb_test_tools.py | 2 +- test/shaping/tests/arabic-fallback-shaping.tests | 2 +- test/shaping/tests/hangul-jamo.tests | 9 - test/shaping/tests/indic-joiner-candrabindu.tests | 2 + util/Makefile.am | 4 + util/Makefile.in | 4 + util/hb-ot-shape-closure.cc | 2 +- util/hb-shape.cc | 2 +- util/hb-view.cc | 5 +- util/helper-cairo-ansi.cc | 4 +- util/helper-cairo.cc | 16 +- util/helper-cairo.hh | 5 +- util/main-font-text.hh | 4 +- util/options.cc | 47 +- util/options.hh | 16 +- util/view-cairo.cc | 2 +- util/view-cairo.hh | 8 +- 119 files changed, 5682 insertions(+), 3197 deletions(-) create mode 100644 README.python create mode 100644 test/shaping/fonts/sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf create mode 100644 test/shaping/tests/indic-joiner-candrabindu.tests diff --git a/Android.mk b/Android.mk index 07dfa5b..0552507 100644 --- a/Android.mk +++ b/Android.mk @@ -99,8 +99,7 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ liblog LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/src \ - external/icu/icu4c/source/common + $(LOCAL_PATH)/src LOCAL_CFLAGS += -DHB_NO_MT -DHAVE_OT -DHAVE_ICU -DHAVE_ICU_BUILTIN LOCAL_MODULE:= libharfbuzz_ng include $(BUILD_SHARED_LIBRARY) diff --git a/ChangeLog b/ChangeLog index 909fdf0..2ef17b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,1903 @@ +commit 9e401f6890f2bea1d11914bca436c2230f8d0f1b +Author: Behdad Esfahbod +Date: Fri Mar 20 16:08:38 2015 -0400 + + Fix reverse_range() for empty range + + Fixes coretext notdef loop consisting of all default_ignorable glyphs + + https://code.google.com/p/chromium/issues/detail?id=464755 + + src/hb-buffer.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7481bd49d56d4e814ab1f85fc2df8bf934d520f4 +Author: Behdad Esfahbod +Date: Wed Mar 4 15:47:25 2015 -0800 + + Fix previous commit + + I misunderstood how which works. + + autogen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6763e21afb77b250ad4416ff921d46c63ea12443 +Author: Behdad Esfahbod +Date: Wed Mar 4 15:43:05 2015 -0800 + + Accept glibtoolize as libtoolize + + Of course, we don't really run it, autoreconf does. We just + err if neither is available. glibtoolize is the name it is + shipped under on OS X. Reported by Adam. + + autogen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 02a04e6afb1a76894f3723a467716607970d95d3 +Author: Behdad Esfahbod +Date: Wed Mar 4 12:32:03 2015 -0800 + + 0.9.39 + + NEWS | 10 ++++++++++ + configure.ac | 2 +- + 2 files changed, 11 insertions(+), 1 deletion(-) + +commit 98e3ea8e34c798ce003e946c9a150bb41be9d09b +Author: Behdad Esfahbod +Date: Wed Mar 4 12:03:39 2015 -0800 + + Fix hb-uniscribe build + + src/hb-ot-name-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8ac345e5c0ed0aad6547592ea0839aabfb4ba980 +Author: Behdad Esfahbod +Date: Mon Mar 2 16:06:55 2015 -0800 + + Fix reverse_range() to only reverse alt array if positions are used + + In hb-coretext, when we were using scratch buffer for book-keeping, + a reverse_range() caused by the notdef-insertion loop could mess up + our log_clusters. Ouch! + + src/hb-buffer.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1e03d7ac83f3e17aafed1e37390d9ff8394e36da +Author: Behdad Esfahbod +Date: Thu Feb 26 13:58:32 2015 -0800 + + Better error message if libtool is not installed + + Fixes https://github.com/behdad/harfbuzz/pull/88 + + autogen.sh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 6c918e2997fb82e89485f2b50bee2bf4fcd70592 +Author: Behdad Esfahbod +Date: Thu Feb 26 13:55:34 2015 -0800 + + Clean up gtk-doc.make + + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +commit 5ec5875acb12cf07447c9ebfb03212601368dfc4 +Author: Behdad Esfahbod +Date: Thu Feb 26 13:53:05 2015 -0800 + + Install git.mk in docs/ + + docs/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +commit d146678d103425b3da7ef393bc6d66f6ba4c5593 +Author: Behdad Esfahbod +Date: Thu Feb 26 13:52:50 2015 -0800 + + Update git.mk from upstream + + git.mk | 35 ++++++++++++++++++++++++++++------- + 1 file changed, 28 insertions(+), 7 deletions(-) + +commit 5f541f8f7be82f29b77b481827deb212e12d53e4 +Author: Behdad Esfahbod +Date: Sat Feb 21 16:51:17 2015 +0300 + + Minor refactoring + + src/hb-private.hh | 44 ++++++++++++++++++++++++++++---------------- + 1 file changed, 28 insertions(+), 16 deletions(-) + +commit ef79bdf73bbfde1bfaa222834809d105ab7755b3 +Author: Behdad Esfahbod +Date: Sat Feb 21 16:49:15 2015 +0300 + + Minor + + src/hb-ot-layout-common-private.hh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 68e04afbb1e1073c47474f7a4d6d2cacf7057f6f +Author: Behdad Esfahbod +Date: Sat Feb 21 16:30:28 2015 +0300 + + Typo + + src/hb-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 55553699b38d6481fbfacd0a32fc266e55553b34 +Author: Behdad Esfahbod +Date: Sat Feb 21 16:29:08 2015 +0300 + + Minor + + src/hb-private.hh | 2 -- + 1 file changed, 2 deletions(-) + +commit 5175300fbaf4ff19b7d38c14c86331bb614b0390 +Author: Behdad Esfahbod +Date: Sat Feb 21 12:50:01 2015 +0300 + + [layout] Fix comparison of GlyphID and hb_codepoint_t + + Before, the IntType::cmp functions providing this and was truncating + the hb_codepoint_t to 16bits before comparison. I have no idea how + this was never discovered, and I'm too lazy to try to reproduce this + with Pango (which uses non-16bit codepoint numbers for missing + glyphs). + + src/hb-open-type-private.hh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 7cce809cb11e0ce65dbdab899779ece3dc337763 +Author: Behdad Esfahbod +Date: Sat Feb 21 12:41:08 2015 +0300 + + Remove unused (and wrong as of a few commits ago) cmp() function + + src/hb-open-type-private.hh | 1 - + 1 file changed, 1 deletion(-) + +commit 8e3d4bae033bdec649676da26cfc3eb7610832a8 +Author: Behdad Esfahbod +Date: Sat Feb 21 12:31:59 2015 +0300 + + Minor + + src/hb-ot-layout-common-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f47cf1f12dd1fa3cd3aa84502139caca9d469af8 +Author: Behdad Esfahbod +Date: Sat Feb 21 11:45:22 2015 +0300 + + Minor + + src/hb-ot-layout.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 640b66c6348653bfd7cf88ea9caa2133c0eb949f +Author: Behdad Esfahbod +Date: Thu Feb 19 17:30:05 2015 +0300 + + [layout] If lookup has only one subtable, move the forward loop down + to subtable + + I was hoping to see a nice speedup, but it resulted in a very + minor one. + + src/hb-ot-layout.cc | 33 ++++++++++++++++++++++++++++++++- + 1 file changed, 32 insertions(+), 1 deletion(-) + +commit e2f50f2a7ebf9882ea89dc3f0c740e7fce964e37 +Author: Behdad Esfahbod +Date: Thu Feb 19 17:15:05 2015 +0300 + + [layout] Add apply_forward / apply_backward + + src/hb-ot-layout.cc | 69 + +++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 46 insertions(+), 23 deletions(-) + +commit 1d4a328472f094c0d75a062f6e176c6b1875cfdc +Author: Behdad Esfahbod +Date: Thu Feb 19 11:33:30 2015 +0300 + + [layout] Remove unneeded return value from apply() + + src/hb-ot-layout.cc | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +commit bbdd6fd21cc2e079defff7cb17c3eb8eff3f9e09 +Author: Behdad Esfahbod +Date: Thu Feb 19 17:03:02 2015 +0300 + + Minor simpilfy BEInt + + src/hb-open-type-private.hh | 25 ++----------------------- + 1 file changed, 2 insertions(+), 23 deletions(-) + +commit 88a399acdc0fcb060803da0e7db56de2866981e3 +Author: Behdad Esfahbod +Date: Thu Feb 19 16:57:12 2015 +0300 + + Optimize IntType comparison to avoid branches for 16bit numbers + + src/hb-open-type-private.hh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit 37de2d533126245774417234e3536fcfb24f3a6b +Author: Behdad Esfahbod +Date: Thu Feb 19 16:55:51 2015 +0300 + + Minor simplify IntType + + src/hb-open-type-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit bd047d3b7f04d551c0a26bc0ce9b9d61481e34e1 +Author: Behdad Esfahbod +Date: Thu Feb 19 10:47:18 2015 +0300 + + [layout] Minor + + src/hb-ot-layout-gpos-table.hh | 6 ++++++ + src/hb-ot-layout-gsub-table.hh | 6 ++++++ + src/hb-ot-layout.cc | 4 ++-- + 3 files changed, 14 insertions(+), 2 deletions(-) + +commit b9d3f60520c022dc952e65a66eb138d1f7cae2e1 +Author: Behdad Esfahbod +Date: Thu Feb 19 10:42:41 2015 +0300 + + [layout] Minor + + src/hb-ot-layout.cc | 15 ++++----------- + 1 file changed, 4 insertions(+), 11 deletions(-) + +commit 1a2322134a5d7bba990da28baf893b35879a5a7a +Author: Behdad Esfahbod +Date: Thu Feb 19 10:40:23 2015 +0300 + + [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. + + src/hb-ot-layout-gpos-table.hh | 10 +--------- + src/hb-ot-layout-gsub-table.hh | 10 +--------- + 2 files changed, 2 insertions(+), 18 deletions(-) + +commit 095a1257cc3cc56b044b4cd842a92f0d0f933a50 +Author: Behdad Esfahbod +Date: Thu Feb 19 10:29:41 2015 +0300 + + [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... + + src/hb-open-type-private.hh | 5 ++- + src/hb-ot-layout-gpos-table.hh | 82 + +---------------------------------- + src/hb-ot-layout-gsub-table.hh | 72 ++----------------------------- + src/hb-ot-layout-gsubgpos-private.hh | 84 + ++++++++++++------------------------ + 4 files changed, 37 insertions(+), 206 deletions(-) + +commit 758fb20630f84c3d373cda37974b88f16c02995e +Author: Behdad Esfahbod +Date: Wed Feb 18 13:45:03 2015 +0300 + + Remove unused macro + + src/hb-ot-shape-complex-arabic-win1256.hh | 1 - + 1 file changed, 1 deletion(-) + +commit 40c58923cbf689c465f9b65334c455a9b7f71ab0 +Author: Behdad Esfahbod +Date: Wed Feb 18 13:18:46 2015 +0300 + + [layout] Refactor Lookup::dispatch() + + src/hb-ot-layout-common-private.hh | 20 ++++++++++++++++++++ + src/hb-ot-layout-gpos-table.hh | 12 +----------- + src/hb-ot-layout-gsub-table.hh | 12 +----------- + src/hb-ot-layout-gsubgpos-private.hh | 6 ------ + 4 files changed, 22 insertions(+), 28 deletions(-) + +commit 70366f5d19df2e654f0933474fecf1aa16e27812 +Author: Behdad Esfahbod +Date: Wed Feb 18 13:09:54 2015 +0300 + + [layout] Refactor get_subtable() + + src/hb-ot-layout-common-private.hh | 12 ++++++++++++ + src/hb-ot-layout-gpos-table.hh | 4 ++-- + src/hb-ot-layout-gsub-table.hh | 6 +++--- + 3 files changed, 17 insertions(+), 5 deletions(-) + +commit f72f326aea6d1e93f63040730f7aecd401676c1c +Author: Behdad Esfahbod +Date: Tue Feb 17 19:18:07 2015 +0300 + + Minor + + src/hb-ot-layout-gpos-table.hh | 1 - + 1 file changed, 1 deletion(-) + +commit 8e36ccfd4f076888076ca176c055c18104af03b6 +Author: Behdad Esfahbod +Date: Tue Feb 17 19:15:34 2015 +0300 + + [layout] Use dispatch() for add_coverage() + + src/hb-ot-layout-gpos-table.hh | 12 ++---------- + src/hb-ot-layout-gsub-table.hh | 12 ++---------- + src/hb-ot-layout-gsubgpos-private.hh | 12 ++++++++++-- + 3 files changed, 14 insertions(+), 22 deletions(-) + +commit 50b8dc79daffc7ef671dd5eedfea47f8d5e946f4 +Author: Behdad Esfahbod +Date: Tue Feb 17 18:14:17 2015 +0300 + + [layout] Add may_dispatch() + + No functional change right now. + + src/hb-ot-layout-gpos-table.hh | 7 +++++++ + src/hb-ot-layout-gsub-table.hh | 6 ++++++ + src/hb-ot-layout-gsubgpos-private.hh | 12 ++++++++++++ + 3 files changed, 25 insertions(+) + +commit de2118ed7a998a1df9b28fd1be96b4af89ed82c3 +Author: Behdad Esfahbod +Date: Tue Feb 17 17:27:44 2015 +0300 + + 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... + + src/hb-open-file-private.hh | 15 +++-- + src/hb-open-type-private.hh | 51 +++++++++++------ + src/hb-ot-cmap-table.hh | 35 ++++++++---- + src/hb-ot-head-table.hh | 6 +- + src/hb-ot-hhea-table.hh | 3 +- + src/hb-ot-hmtx-table.hh | 3 +- + src/hb-ot-layout-common-private.hh | 58 ++++++++++++------- + src/hb-ot-layout-gdef-table.hh | 30 ++++++---- + src/hb-ot-layout-gpos-table.hh | 108 + +++++++++++++++++++++++------------ + src/hb-ot-layout-gsub-table.hh | 58 ++++++++++++------- + src/hb-ot-layout-gsubgpos-private.hh | 65 +++++++++++++-------- + src/hb-ot-layout-jstf-table.hh | 12 ++-- + src/hb-ot-maxp-table.hh | 6 +- + src/hb-ot-name-table.hh | 6 +- + 14 files changed, 296 insertions(+), 160 deletions(-) + +commit 6759ed95a3bec2874826376b68ebff19ba277ef2 +Author: Behdad Esfahbod +Date: Tue Feb 17 16:05:30 2015 +0300 + + Minor + + src/hb-ot-layout-gpos-table.hh | 6 ++---- + src/hb-ot-layout-gsub-table.hh | 6 ++---- + 2 files changed, 4 insertions(+), 8 deletions(-) + +commit 6b599dac1f814a3c900300241d4c492a8f8b66d2 +Author: Behdad Esfahbod +Date: Tue Feb 17 16:04:07 2015 +0300 + + Remove unnecessary check in sanitize + + src/hb-ot-layout-gpos-table.hh | 2 -- + src/hb-ot-layout-gsub-table.hh | 2 -- + 2 files changed, 4 deletions(-) + +commit 365576d246949f9d587e90cf0539dc0381e4d0a3 +Author: Behdad Esfahbod +Date: Thu Jan 29 13:59:42 2015 +0100 + + [layout] Allocate iters in the context + + Can be further optimized, but I think I didn't break anything. + + Saves another 3% off Roboto shaping. + + src/hb-ot-layout-gpos-table.hh | 18 ++++++------------ + src/hb-ot-layout-gsubgpos-private.hh | 21 +++++++++++++-------- + src/hb-ot-shape-fallback.cc | 2 +- + 3 files changed, 20 insertions(+), 21 deletions(-) + +commit 514564f5444b8ad2f210b1e3d7d66378f7275317 +Author: Behdad Esfahbod +Date: Thu Jan 29 13:48:48 2015 +0100 + + [layout] Move skippy_iter setup from constructor into init() + + src/hb-ot-layout-gpos-table.hh | 18 ++++++++++++------ + src/hb-ot-layout-gsubgpos-private.hh | 28 +++++++++++++++------------- + src/hb-ot-shape-fallback.cc | 3 ++- + 3 files changed, 29 insertions(+), 20 deletions(-) + +commit b051be542a8945ec14b0192bbc285f3e1a78c8f1 +Author: Behdad Esfahbod +Date: Thu Jan 29 13:40:39 2015 +0100 + + [lookup] Add skippy_iter.reset() + + Towards reducing the cost of initializing skippy_iter() + + src/hb-ot-layout-gpos-table.hh | 18 ++++++++++++------ + src/hb-ot-layout-gsubgpos-private.hh | 27 ++++++++++++++++++--------- + src/hb-ot-shape-fallback.cc | 3 ++- + 3 files changed, 32 insertions(+), 16 deletions(-) + +commit 2cecc38c7cf49b2cf697efa7e974ceee7055f2c5 +Author: Behdad Esfahbod +Date: Thu Jan 29 13:32:05 2015 +0100 + + [layout] Shuffle code around + + src/hb-ot-layout-gsubgpos-private.hh | 111 + ++++++++++++++++++----------------- + 1 file changed, 56 insertions(+), 55 deletions(-) + +commit 696266981df5ef6c62ad0115133dad1d6c1d9acc +Author: Behdad Esfahbod +Date: Thu Jan 29 13:08:41 2015 +0100 + + [layout] Merge forward and backward iterators + + src/hb-ot-layout-gpos-table.hh | 12 +++--- + src/hb-ot-layout-gsubgpos-private.hh | 71 + ++++++++---------------------------- + src/hb-ot-shape-fallback.cc | 2 +- + 3 files changed, 23 insertions(+), 62 deletions(-) + +commit 1f038eec3c0dd6331036f795614fe1ddcbf613b0 +Author: Behdad Esfahbod +Date: Thu Jan 29 13:05:25 2015 +0100 + + [layout] Fix backward reject() + + Has no functional effect since reject was never used with + match_glyph_data. + + src/hb-ot-layout-gsubgpos-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 37d13acd8d414a4b53fac0152addfadecf755cd4 +Author: Behdad Esfahbod +Date: Thu Jan 29 11:38:01 2015 +0100 + + [layout] Remove some unnecessary checks in skippy + + src/hb-ot-layout-gpos-table.hh | 3 --- + src/hb-ot-layout-gsubgpos-private.hh | 9 ++------- + 2 files changed, 2 insertions(+), 10 deletions(-) + +commit baa14e18148d3f5493f78b4fe9e0c835a01f50f7 +Author: Behdad Esfahbod +Date: Thu Jan 29 11:08:43 2015 +0100 + + [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. + + src/hb-ot-layout-gpos-table.hh | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +commit 7788993bc19bf122f1e143ab64cc1da2ed1865a3 +Author: Behdad Esfahbod +Date: Wed Jan 28 23:01:12 2015 -0800 + + [layout] Use setter method to set c->lookup_props + + src/hb-ot-layout-gpos-table.hh | 2 +- + src/hb-ot-layout-gsub-table.hh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit f4ee48fd7b312550faf9b0be4cd1b2f2849dd08d +Author: Behdad Esfahbod +Date: Wed Jan 28 22:53:54 2015 -0800 + + [layout] Remove unused wrapper method + + src/hb-ot-layout-gsubgpos-private.hh | 2 -- + 1 file changed, 2 deletions(-) + +commit 7b7129c7a997def599fb4d2ba05fda40d27aed20 +Author: Behdad Esfahbod +Date: Wed Jan 28 21:46:07 2015 -0800 + + 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 :(. + + src/hb-set-private.hh | 57 + ++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 56 insertions(+), 1 deletion(-) + +commit 241eac9559465fa79f396570af4e87f455b7e9d5 +Author: Behdad Esfahbod +Date: Wed Jan 28 20:55:42 2015 -0800 + + Hide internals of lookup accelerators + + src/hb-ot-layout-gsub-table.hh | 5 +++-- + src/hb-ot-layout-private.hh | 5 +++++ + src/hb-ot-layout.cc | 6 +++--- + 3 files changed, 11 insertions(+), 5 deletions(-) + +commit e2d4e8480d85436a3acad8145acac345ed593f5a +Author: Behdad Esfahbod +Date: Wed Jan 28 20:29:48 2015 -0800 + + [util] Add convenience "make lib" target + + util/Makefile.am | 4 ++++ + 1 file changed, 4 insertions(+) + +commit faaae64bf28abdcdd15185374bc09a3809794118 +Merge: 7888a6b 9768e65 +Author: Behdad Esfahbod +Date: Wed Feb 25 15:34:34 2015 -0800 + + Merge pull request #85 from KonstantinRitt/define_inline + + Fix build with MSVC on CE + +commit 9768e651be0561f07d6f38c3ed8bc5ee04882990 +Author: Konstantin Ritt +Date: Sat Feb 14 00:58:51 2015 +0400 + + 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 + + src/hb-private.hh | 10 ---------- + 1 file changed, 10 deletions(-) + +commit 7888a6b07a9922cedd3e0d235959058e0011357b +Author: Behdad Esfahbod +Date: Wed Jan 28 12:40:40 2015 -0800 + + [ft] Handle negative scales with vertical writing + + src/hb-ft.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 982d94eaa2a377616f22f39427e5ed9f1ce43263 +Author: Behdad Esfahbod +Date: Wed Jan 28 10:51:33 2015 -0800 + + [coretext] Don't generate notdef glyph for default-ignorables + + As discovered on Chrome Mac: + https://code.google.com/p/chromium/issues/detail?id=452326 + + src/hb-coretext.cc | 2 ++ + src/hb-ot-shape.cc | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +commit 6917a045fd8d16952cad75fda8b291b11e1d3564 +Author: Behdad Esfahbod +Date: Wed Jan 28 10:43:32 2015 -0800 + + [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 + Date: Mon Aug 11 23:47:16 2014 -0400 + + [coretext] Implement vertical shaping + + src/hb-coretext.cc | 35 +++++++++++++++++++++++++++-------- + 1 file changed, 27 insertions(+), 8 deletions(-) + +commit 1eff4350239b0768e1042b52db9fb1c0d266f96a +Author: Behdad Esfahbod +Date: Tue Jan 27 12:26:04 2015 -0800 + + Minor optimization + + src/hb-ot-shape-normalize.cc | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 675956aca01fc4e005a338af43d1c1f4f938abd1 +Author: Konstantin Ritt +Date: Tue Jan 27 11:23:07 2015 +0400 + + Do not leak hb_language_t on hb_language_item_t destruction + + src/hb-common.cc | 1 + + 1 file changed, 1 insertion(+) + +commit b306f9674a599da50754d24fa5aefcb6bba04420 +Author: Konstantin Ritt +Date: Tue Jan 27 20:08:41 2015 +0400 + + Minor improvement to HB_SHAPER_DATA_DESTROY + + src/hb-shaper-private.hh | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +commit 61820bc4ca1f02433db4be7c81f27cf97e2bd519 +Author: Behdad Esfahbod +Date: Mon Jan 26 14:25:52 2015 -0800 + + [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! + + src/hb-buffer.cc | 36 +++++++++++++++++++++++++------- + src/hb-buffer.h | 8 ++++++++ + src/hb-utf-private.hh | 57 + ++++++++++++++++++++++++++++++++++++++------------- + 3 files changed, 80 insertions(+), 21 deletions(-) + +commit 78c6e86c04f12154c88b9f9264d0bd50b721699b +Author: Behdad Esfahbod +Date: Mon Jan 26 14:08:36 2015 -0800 + + Fix hb_buffer_add_codepoints to actually NOT validate + + src/hb-buffer.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 70c25ee215635db23eb0757641bd372940c0d85d +Merge: 28f5e0b f3537b6 +Author: Behdad Esfahbod +Date: Sun Jan 25 13:06:03 2015 -0800 + + Merge pull request #81 from KonstantinRitt/fixes/build/win8phone + + winrt_buildfixes + +commit f3537b620b0a7392ea27f01f465c5ba79459c858 +Author: Konstantin Ritt +Date: Sun Jan 25 09:50:51 2015 +0400 + + Move some code around + + Just to keep Windows specific workarounds in a single place. + + src/hb-private.hh | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) + +commit afb62d88d78cacb6b881aaf329a654fd32f5ae29 +Author: Konstantin Ritt +Date: Sun Jan 25 08:16:26 2015 +0400 + + Do not define MemoryBarrier on WinCE + + There is a _HBMemoryBarrier() wrapper function that emulates + MemoryBarrier() behavior when it is not defined. + + src/hb-private.hh | 1 - + 1 file changed, 1 deletion(-) + +commit 7db326a15b173c0d101adc608bf551a628c65dcd +Author: Konstantin Ritt +Date: Sun Jan 25 08:13:24 2015 +0400 + + 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/ + + src/hb-mutex-private.hh | 4 ++++ + src/hb-private.hh | 2 ++ + 2 files changed, 6 insertions(+) + +commit 28f5e0b2f41670617bd778660364bbd58b1b68f2 +Author: Behdad Esfahbod +Date: Fri Jan 23 12:45:35 2015 -0800 + + 0.9.38 + + NEWS | 23 +++++++++++++++++++++++ + configure.ac | 2 +- + 2 files changed, 24 insertions(+), 1 deletion(-) + +commit a319d0777b746a2bbe5cd5a206172f1580da3379 +Author: Behdad Esfahbod +Date: Fri Jan 23 12:44:24 2015 -0800 + + [ft] Handle negative x_scale / y_scale + + src/hb-ft.cc | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit b0b38bb892473d9a65e06dd3b4713da39f92bef9 +Author: Behdad Esfahbod +Date: Wed Jan 21 19:19:33 2015 -0800 + + [coretext] Fix positioning of notdef + + src/hb-coretext.cc | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +commit 70622e5089c01ea16fd9deed11cb39d43145c121 +Author: Behdad Esfahbod +Date: Wed Jan 21 18:50:57 2015 -0800 + + [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. + + src/hb-coretext.cc | 26 +++++++++++++++++++------- + 1 file changed, 19 insertions(+), 7 deletions(-) + +commit 221ba02b0816584a02471037edae7cec9c1b8acc +Author: Behdad Esfahbod +Date: Wed Jan 21 16:42:09 2015 -0800 + + [coretext] Use vertical advance for notdef in vertical direction + + src/hb-coretext.cc | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 7988da24c507ee310772f72cc5bcfd3c0a1187a0 +Author: Behdad Esfahbod +Date: Wed Jan 21 18:33:50 2015 -0800 + + Add convenience make target "make lib" in src/ + + src/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +commit 31d48dd919e3b4a0bec5ede384f76db9b44f4d71 +Author: Behdad Esfahbod +Date: Wed Jan 21 01:57:44 2015 -0800 + + Add README.python + + README.python | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +commit ca1c2813dd0b082a8c418bd3edd3f6cba97bd5f0 +Author: Behdad Esfahbod +Date: Wed Jan 21 01:51:48 2015 -0800 + + [bindings] Add README.python + + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +commit cd4eb96abb90a84b42e9b288e39bad759e4411a0 +Author: Behdad Esfahbod +Date: Tue Jan 20 12:30:45 2015 -0800 + + [util] Add --font-size to hb-shape + + Also makes hb-view to use 8 bits of subpixel precision and shape at + requested size, instead of always shaping at upem and scaling results. + + util/hb-ot-shape-closure.cc | 2 +- + util/hb-shape.cc | 2 +- + util/hb-view.cc | 5 ++++- + util/helper-cairo.cc | 16 ++++++++-------- + util/helper-cairo.hh | 5 ++--- + util/main-font-text.hh | 4 ++-- + util/options.cc | 44 + +++++++++++++++++++++++++++++++++++++++++--- + util/options.hh | 16 ++++++++++++---- + util/view-cairo.cc | 2 +- + util/view-cairo.hh | 8 ++++---- + 10 files changed, 76 insertions(+), 28 deletions(-) + +commit 5789ca69d7464bab5fa0c5bdf404f3afaa490faf +Author: Behdad Esfahbod +Date: Fri Jan 9 14:22:01 2015 -0800 + + [util] Minor + + util/options.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 67dfa8c7c2f2e9040a9c60c680f739ada4a35fb5 +Author: Behdad Esfahbod +Date: Mon Jan 19 17:00:31 2015 -0800 + + 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. + + src/hb-ot-layout-gpos-table.hh | 21 ++++++++++++++++----- + 1 file changed, 16 insertions(+), 5 deletions(-) + +commit e9f5c65be027eb7759ab819e267e24dff3b017b6 +Author: Behdad Esfahbod +Date: Mon Jan 19 14:42:11 2015 -0800 + + [bindings] Minor + + src/sample.py | 2 ++ + 1 file changed, 2 insertions(+) + +commit 3704628d1f124234324b5f2bdd5fdd61c14c7801 +Merge: 1aaa7d6 5eb939d +Author: Behdad Esfahbod +Date: Mon Jan 19 16:15:00 2015 -0800 + + Merge pull request #77 from roozbehp/master + + Change New Tai Lue shaping engine from SEA to default + +commit 5eb939ddfe9ef217da2e48d7d0f1f4b7501714ad +Author: Roozbeh Pournader +Date: Sun Jan 18 14:30:08 2015 -0800 + + 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. + + src/hb-ot-shape-complex-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1aaa7d6799b42b392dd191d3c12011721ef99e74 +Author: Behdad Esfahbod +Date: Sat Jan 17 20:16:56 2015 -0800 + + [indic] Fix out-of-bounds access + + src/gen-indic-table.py | 2 +- + src/hb-ot-shape-complex-indic-table.cc | 36 + +++++++++++++++++----------------- + 2 files changed, 19 insertions(+), 19 deletions(-) + +commit 238d6a38f2ceb7d8dceec9365a823f032b3b9f7d +Author: Behdad Esfahbod +Date: Wed Jan 7 10:51:44 2015 -0800 + + [bindings] Update sample.py + + src/sample.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 2cd5323531dcd800549b2cb1cb51d708e72ab2d8 +Author: Behdad Esfahbod +Date: Tue Jan 6 19:16:38 2015 -0800 + + [bindings] Use hb_glib_blob_create() in sample + + hb_blob_create() is considered C-only API. + + src/hb-blob.cc | 8 ++++---- + src/sample.py | 19 +++++++++---------- + 2 files changed, 13 insertions(+), 14 deletions(-) + +commit 0ef179e2dc040c13497af847b8c1cec846dbdbf9 +Author: Behdad Esfahbod +Date: Tue Jan 6 16:58:33 2015 -0800 + + [glib] Add hb_glib_blob_create() that takes GBytes + + src/hb-glib.cc | 11 +++++++++++ + src/hb-glib.h | 3 +++ + 2 files changed, 14 insertions(+) + +commit b91904a40da6287f84bc79de60674fa57232ec09 +Author: Behdad Esfahbod +Date: Tue Jan 6 15:43:14 2015 -0800 + + [bindings] Replace deprecated allow-none with optional and nullable + + src/hb-blob.cc | 4 ++-- + src/hb-shape.cc | 2 +- + src/hb-unicode.cc | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +commit 81a31f3eff44a85bb2160d51156a01a18f0a97df +Author: Behdad Esfahbod +Date: Tue Jan 6 15:37:31 2015 -0800 + + [bindings] Make sample Python 2/3 compatible + + src/sample.py | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +commit b632e7997d9cb6e4782cab6d8c62e8e5edaa4cb0 +Author: Behdad Esfahbod +Date: Tue Jan 6 14:05:26 2015 -0800 + + Fix up gobject-introspection a bit + + Minimal shaping works now! + + src/hb-blob.cc | 6 +++--- + src/hb-buffer.cc | 2 +- + src/sample.py | 34 ++++++++++++++++++++++++++++------ + 3 files changed, 32 insertions(+), 10 deletions(-) + +commit 3d1a666a8629a8502a2bcf23ab943e2b39a0da92 +Author: Behdad Esfahbod +Date: Mon Jan 5 14:43:13 2015 -0800 + + Remove hardcoded ICU include paths. + + ICU exports them using LOCAL_EXPORT_C_INCLUDE_DIRS. + + https://android-review.googlesource.com/#/c/121311/ + + Android.mk | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 8cb41cb9508eb1bb6319e92f900cfe5e8a131be3 +Merge: 365c03f fb85d61 +Author: Behdad Esfahbod +Date: Sun Jan 4 20:32:18 2015 -0800 + + Merge pull request #76 from cpeterso/cpeterso/Wunused-function + + Add #ifdef HB_USE_ATEXIT to fix -Wunused-function warnings + +commit fb85d618f5883458bacf0ecb0894772291a2d738 +Author: Chris Peterson +Date: Sun Jan 4 19:31:10 2015 -0800 + + Add #ifdef HB_USE_ATEXIT to fix -Wunused-function warnings + + src/hb-common.cc | 2 +- + src/hb-ft.cc | 4 +++- + src/hb-shape.cc | 4 +++- + src/hb-shaper.cc | 4 +++- + 4 files changed, 10 insertions(+), 4 deletions(-) + +commit 365c03fc2bcdb4098314a0e123c46018fb882586 +Merge: c36c4a9 d1897a9 +Author: Behdad Esfahbod +Date: Sat Jan 3 21:55:30 2015 -0800 + + Merge pull request #75 from cpeterso/cpeterso/Wunused-value + + Fix hb_atomic_ptr_cmpexch -Wunused-value warnings + +commit d1897a98d8da40cffb57c07099a9a93cfeaacc36 +Author: Chris Peterson +Date: Sat Jan 3 19:46:19 2015 -0800 + + Fix hb_atomic_ptr_cmpexch -Wunused-value warnings + + src/hb-common.cc | 2 +- + src/hb-icu.cc | 4 +--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +commit c36c4a9924609df648e62e47fa017b19b844fd98 +Author: Behdad Esfahbod +Date: Fri Jan 2 14:09:23 2015 -0800 + + Add missing va_end() + + Fixes https://github.com/behdad/harfbuzz/pull/74 + + util/options.cc | 1 + + 1 file changed, 1 insertion(+) + +commit f34aaba8687a20794835e2dc878c52d1b53e6f85 +Author: Behdad Esfahbod +Date: Sun Dec 28 18:56:15 2014 -0800 + + [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. + + src/hb-ft.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 350f3a02ce225e5d78db8ac96de1351ff9f96dd5 +Author: Behdad Esfahbod +Date: Sun Dec 28 17:44:26 2014 -0800 + + [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 + + configure.ac | 4 ++-- + src/hb-ft.cc | 32 ++++++++++++++++++++++++++++++++ + src/hb-ft.h | 59 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 3 files changed, 92 insertions(+), 3 deletions(-) + +commit 9a3b74884b2e41c7040611030f4336f13d18fd3e +Author: Behdad Esfahbod +Date: Sun Dec 28 17:27:39 2014 -0800 + + Remove redundant check for FT_Face_GetCharVariantIndex + + We require FreeType >= 2.8.3. This symbol was introduced earlier + than that. + + configure.ac | 9 +-------- + src/hb-ft.cc | 2 -- + 2 files changed, 1 insertion(+), 10 deletions(-) + +commit 1226b2e930aa456cc05bbe621c96f4286a95cff6 +Author: Behdad Esfahbod +Date: Sun Dec 28 17:04:23 2014 -0800 + + Fix FreeType version check + + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit affacf2f37db767ab8df7f2db6cd9e0e9b0a2b8a +Author: Behdad Esfahbod +Date: Sun Dec 28 16:20:31 2014 -0800 + + [ft] Open blob in READONLY mode + + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE is deprecated and fairly + useless now. + + src/hb-ft.cc | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +commit 395b35903e052aecc97d0807e4f813c64c0d2b0b +Author: Behdad Esfahbod +Date: Sun Dec 28 16:03:26 2014 -0800 + + 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. + + src/hb-ot-layout-private.hh | 3 +-- + src/hb-ot-layout.cc | 4 ++-- + src/hb-ot-shape-complex-arabic-fallback.hh | 2 +- + 3 files changed, 4 insertions(+), 5 deletions(-) + +commit 7d5e7613ced3dd39d05df83ca7e8952cbecd68f6 +Author: Behdad Esfahbod +Date: Thu Dec 18 18:22:21 2014 -0800 + + 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. + + src/hb-blob.cc | 5 ++++- + test/api/test-blob.c | 3 +++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +commit d5a5052098b0aa79ff55c235e61a9db477c4120f +Author: Behdad Esfahbod +Date: Thu Dec 18 18:09:41 2014 -0800 + + 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. + + src/hb-open-type-private.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 66e37409b3bc1eddc86704ae26d9176677ce6aa6 +Author: Behdad Esfahbod +Date: Wed Dec 17 12:09:17 2014 -0800 + + 0.9.37 + + NEWS | 8 ++++++++ + configure.ac | 2 +- + 2 files changed, 9 insertions(+), 1 deletion(-) + +commit 093c520de506aec74f3fb1e195c0ca85813424dd +Author: Behdad Esfahbod +Date: Fri Dec 12 21:07:53 2014 -0800 + + [otlayout] Mark variables that are C arrays as opposed to OT::ArrayOf + + src/hb-ot-layout-gpos-table.hh | 24 +++++++-------- + src/hb-ot-layout-gsubgpos-private.hh | 60 + ++++++++++++++++++------------------ + 2 files changed, 42 insertions(+), 42 deletions(-) + +commit 9df0a520306a491f973d42965597bfda6023e508 +Author: Behdad Esfahbod +Date: Fri Dec 12 20:54:28 2014 -0800 + + [otlayout] Avoid invalid access with Context format 3 + + src/hb-ot-layout-gsubgpos-private.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 295ef1dd5229f47d8e0eb5b4eb48c90a6b470073 +Author: Behdad Esfahbod +Date: Fri Dec 12 20:43:18 2014 -0800 + + [ot] Debug get_coverage + + src/hb-ot-layout-gsubgpos-private.hh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 00f6a8e334ec4c586e4e633a95b411ccb50306d3 +Author: Behdad Esfahbod +Date: Fri Dec 12 20:36:49 2014 -0800 + + [ot] Print format in dispatch trace + + src/hb-ot-layout-gpos-table.hh | 16 ++++++++-------- + src/hb-ot-layout-gsub-table.hh | 14 +++++++------- + src/hb-ot-layout-gsubgpos-private.hh | 8 ++++---- + 3 files changed, 19 insertions(+), 19 deletions(-) + +commit 5c7d6f02d71362c2b192a7d96e6181977682921c +Author: Behdad Esfahbod +Date: Fri Dec 12 20:28:49 2014 -0800 + + Minor + + src/hb-private.hh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 153beebba9b76901b8b62b90ba0dc69462ae2090 +Author: Behdad Esfahbod +Date: Fri Dec 12 19:46:09 2014 -0800 + + [ot] Make sure all toplevel tables have tableTag + + src/hb-open-file-private.hh | 2 ++ + src/hb-ot-hhea-table.hh | 2 ++ + src/hb-ot-hmtx-table.hh | 2 ++ + 3 files changed, 6 insertions(+) + +commit 282b13f9b4d86b091714de7fbddc94b3e3ff3d91 +Author: Behdad Esfahbod +Date: Fri Dec 12 19:32:46 2014 -0800 + + [sanitize] Improve debug output some more + + src/hb-open-type-private.hh | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) + +commit 0766ee1f4e6046598a2e8fb1b167c3942b4a87a0 +Author: Behdad Esfahbod +Date: Fri Dec 12 18:23:20 2014 -0800 + + [sanitize] Improve debug output + + src/hb-open-type-private.hh | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit e6f80fa1044243898c402ec6a59d6c1b5420be53 +Author: Behdad Esfahbod +Date: Wed Dec 10 12:05:24 2014 -0800 + + [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%) + + src/hb-ot-shape-complex-indic-machine.rl | 2 +- + test/shaping/Makefile.am | 1 + + .../sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf | Bin 0 -> + 4720 bytes + test/shaping/fonts/sha1sum/MANIFEST | 1 + + test/shaping/tests/MANIFEST | 1 + + test/shaping/tests/indic-joiner-candrabindu.tests | 2 ++ + 6 files changed, 6 insertions(+), 1 deletion(-) + +commit c0e95abc5f3f14121483b71f10837828a3a1d73a +Author: Behdad Esfahbod +Date: Thu Nov 20 14:42:24 2014 -0800 + + 0.9.36 + + NEWS | 12 ++++++++++++ + configure.ac | 2 +- + 2 files changed, 13 insertions(+), 1 deletion(-) + +commit fde3e4a423871463c883cb969e99c29cb6f69f6b +Author: Behdad Esfahbod +Date: Wed Oct 29 11:23:08 2014 -0700 + + 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 + + src/hb-ot-layout-gsubgpos-private.hh | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +commit 5a5640d8506ccfc99fd119e89e829170d1fea421 +Author: Behdad Esfahbod +Date: Tue Oct 14 21:26:13 2014 -0700 + + Move code around + + src/hb-open-type-private.hh | 50 + ++++++++++++++++++++++----------------------- + 1 file changed, 25 insertions(+), 25 deletions(-) + +commit 666b42f73bd1f516657b206ef738108825bf239f +Author: Behdad Esfahbod +Date: Tue Oct 14 21:24:59 2014 -0700 + + Move macros around + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=84491 + + src/hb-open-type-private.hh | 63 + ++++++++++++++++++++++++++++++++++++++------- + src/hb-private.hh | 41 ----------------------------- + src/hb-uniscribe.cc | 6 +++++ + 3 files changed, 60 insertions(+), 50 deletions(-) + +commit 5c87120b8178566ddae99d9825edc24f9b87ea3d +Author: Behdad Esfahbod +Date: Tue Oct 14 20:07:31 2014 -0700 + + Fix misc warnings + + Fixes https://github.com/behdad/harfbuzz/pull/51 + + src/hb-buffer-deserialize-json.rl | 4 ++-- + src/hb-ot-layout-gsub-table.hh | 2 +- + src/hb-private.hh | 6 +++--- + 3 files changed, 6 insertions(+), 6 deletions(-) + +commit a1f27ac3c48cfe6d532dc422cf256952fea472ed +Author: Behdad Esfahbod +Date: Thu Oct 2 16:54:33 2014 -0400 + + Update test expectation for previous commit + + test/shaping/tests/arabic-fallback-shaping.tests | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8afaf096870d7895cf2fffb6438b02c0ad1b6c52 +Author: Behdad Esfahbod +Date: Thu Oct 2 16:40:41 2014 -0400 + + [ft] Add NO_HINTING in a couple other places + + src/hb-ft.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7228011411f0e490ad1ba9894dd0d576823903ea +Author: Behdad Esfahbod +Date: Wed Oct 1 18:58:43 2014 -0400 + + [travis] Fix clang again + + .travis.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 406a020e5228d4a04da6282f5a75165bab7a483e +Author: Behdad Esfahbod +Date: Wed Oct 1 18:54:55 2014 -0400 + + [travis] Fail build if coveralls fails + + .travis.yml | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +commit a8aa20260dbd9af9cbcc7d545fa8b41b07aae276 +Author: Behdad Esfahbod +Date: Wed Oct 1 18:48:40 2014 -0400 + + [travis] Only run coveralls under gcc + + .travis.yml | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit 5de0407337d630117e424b7c715b7cbd432f4ef9 +Author: Behdad Esfahbod +Date: Wed Oct 1 18:18:25 2014 -0400 + + Help clang with gcov + + src/check-defs.sh | 2 +- + src/check-symbols.sh | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit ef40ca8e5e830231539dc61088b58e907a840629 +Author: Behdad Esfahbod +Date: Wed Oct 1 18:07:27 2014 -0400 + + [travis] Try to make coverage work with clang + + .travis.yml | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +commit 52784da17b7278f2587168234878bb15d918c9fe +Author: Behdad Esfahbod +Date: Wed Oct 1 17:57:43 2014 -0400 + + [travis] Minor + + README | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit f2c9005f5123c7f9b227fd9ac9a3438c5fe4cf47 +Author: Behdad Esfahbod +Date: Wed Oct 1 17:45:17 2014 -0400 + + Add README.md symlink to make github happy + + README.md | 1 + + 1 file changed, 1 insertion(+) + +commit 40987e8aaca4155d9cff211549e8d23f24c334e5 +Author: Behdad Esfahbod +Date: Wed Oct 1 17:44:30 2014 -0400 + + [travis] Re-enable clang + + .travis.yml | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +commit 5400ac476e5a5bcc66559fcfb05a683a6b433ea1 +Author: Behdad Esfahbod +Date: Wed Oct 1 17:41:41 2014 -0400 + + Add build and coverage status links + + README | 3 +++ + 1 file changed, 3 insertions(+) + +commit 19360e0a5609c65842a989587b01a4dc7c9eae36 +Author: Behdad Esfahbod +Date: Wed Oct 1 17:35:03 2014 -0400 + + [travis] Report matrix settings to help debugging + + .travis.yml | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 9b89fc52f49b80df1f27ac7de69e0152bdcc94d6 +Author: Behdad Esfahbod +Date: Wed Oct 1 17:20:31 2014 -0400 + + [travis] More coveralls + + .travis.yml | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit a68f2b62c1f24009993911b1dbcb76b821e58c51 +Author: Behdad Esfahbod +Date: Wed Oct 1 17:05:58 2014 -0400 + + [travis] Give coveralls a hand + + .travis.yml | 1 + + 1 file changed, 1 insertion(+) + +commit 5194d647e13aa5ba2cfcdbdcd4a659dc5bd11418 +Author: Behdad Esfahbod +Date: Wed Oct 1 17:03:26 2014 -0400 + + [travis] Disable clang for now + + .travis.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 715f27f85f97fee13b119f60037db5c139489ee6 +Author: Behdad Esfahbod +Date: Wed Oct 1 16:53:00 2014 -0400 + + [test] Fixup test + + test/shaping/tests/hangul-jamo.tests | 9 --------- + 1 file changed, 9 deletions(-) + +commit 2a508ddae5de3852243725ce22caa3dcffccb83e +Author: Behdad Esfahbod +Date: Wed Oct 1 16:49:22 2014 -0400 + + [travis] Another try at coveralls.io + + .travis.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit dfe8078e5be46cab5e67aed977749c1d6725e6a7 +Author: Behdad Esfahbod +Date: Wed Oct 1 16:38:47 2014 -0400 + + [travis] First try to hookup coveralls.io code coverage tracking + + .travis.yml | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 1b387571e4d0eed883f1ae8ec85cf0e818b4a7f9 +Author: Behdad Esfahbod +Date: Wed Oct 1 16:14:59 2014 -0400 + + [travis] Unbreak + + .travis.yml | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +commit e281ed360dfdf803aea87b6078983867d08e07a7 +Author: Behdad Esfahbod +Date: Wed Oct 1 16:09:08 2014 -0400 + + [travis] Minor + + .travis.yml | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +commit c0b82ba32a1987902a3b9c05b46f8be6b121883a +Author: Behdad Esfahbod +Date: Wed Oct 1 14:24:07 2014 -0400 + + Create ragel-generated files in srcdir + + src/Makefile.am | 25 ++++++++++--------------- + 1 file changed, 10 insertions(+), 15 deletions(-) + +commit 79bbb10b0da49ace763a50f259c2ea687143f7ea +Author: Behdad Esfahbod +Date: Wed Oct 1 13:33:21 2014 -0400 + + Clean ragel-generated headers in maintainercleanfiles + + src/Makefile.am | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 8971cac83eb4f06847abfa3eaa15857d27141810 +Author: Behdad Esfahbod +Date: Wed Oct 1 12:41:03 2014 -0400 + + 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. + + src/Makefile.am | 27 +++++++++++++-------------- + 1 file changed, 13 insertions(+), 14 deletions(-) + +commit 22723186652224a635f1dad5cda0f753e78c301d +Author: Behdad Esfahbod +Date: Wed Oct 1 11:56:07 2014 -0400 + + check-static-inits: Filter out zero-length sections + + When compiling with -O0, zero-sized constructors were showing up + and confusing the test. + + src/check-static-inits.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b695a3dc2300ed970a4154ad8b997407b3cb4faf +Author: Behdad Esfahbod +Date: Wed Oct 1 11:55:14 2014 -0400 + + check-static-inits: check for static finalizers + + src/check-static-inits.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 250398b1e4f102e4e44eeb9e2aebf0cd2d397344 +Author: Behdad Esfahbod +Date: Wed Oct 1 11:28:01 2014 -0400 + + Hide other bubble-sort + + src/hb-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c1e87442621beff98791ce56cfd1ccee506c4ee6 +Author: Behdad Esfahbod +Date: Wed Oct 1 11:07:08 2014 -0400 + + Hide bubble-sort! + + src/hb-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 80f77282264afb1356351024b1f062b2824bba3b +Author: Behdad Esfahbod +Date: Thu Sep 25 17:59:46 2014 +0300 + + [util] Fix ansi output when surface is empty + + util/helper-cairo-ansi.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 156852991e18e5ac256ee4d6b2916931cc274977 +Author: Behdad Esfahbod +Date: Thu Sep 25 17:45:49 2014 +0300 + + [ot-font] Add hb_ot_face_cmap_accelerator_t + + src/hb-ot-font.cc | 113 + +++++++++++++++++++++++++++++++----------------------- + 1 file changed, 66 insertions(+), 47 deletions(-) + +commit d088ccaf11d9475fe0d269ce130b1793b8a1ffbf +Author: Behdad Esfahbod +Date: Thu Sep 25 17:26:56 2014 +0300 + + [ot-font] Minor + + src/hb-ot-font.cc | 23 ++++++++++++----------- + 1 file changed, 12 insertions(+), 11 deletions(-) + +commit d7c160a1530adabbcf33725b105072293115a34c +Author: Behdad Esfahbod +Date: Thu Sep 25 17:15:35 2014 +0300 + + [ot-font] Handle missing vertical metrics tables + + src/hb-ot-font.cc | 26 +++++++++++++++++++------- + 1 file changed, 19 insertions(+), 7 deletions(-) + +commit be1cca270257bfdfee3fbe821175269713acf408 +Author: Behdad Esfahbod +Date: Thu Sep 25 16:53:24 2014 +0300 + + [ot-font] Add metrics_accel_t + + src/hb-ot-font.cc | 111 + ++++++++++++++++++++++-------------------------- + src/hb-ot-hhea-table.hh | 2 +- + src/hb-ot-hmtx-table.hh | 4 +- + 3 files changed, 54 insertions(+), 63 deletions(-) + +commit d41b809e9d21e655129a97c600d28f278fd7e62c +Author: Behdad Esfahbod +Date: Thu Sep 25 13:04:08 2014 +0300 + + [ot-font] Start adding vertical support + + src/hb-ot-font.cc | 57 ++++++++++++++++++++++++++++++++++---------- + src/hb-ot-hhea-table.hh | 63 + ++++++++++++++++++++++++++----------------------- + src/hb-ot-hmtx-table.hh | 35 +++++++++++++++++---------- + 3 files changed, 100 insertions(+), 55 deletions(-) + +commit 22f0de5025aeeef4c8b3ca876d291d4c8e558d94 +Author: Behdad Esfahbod +Date: Mon Aug 25 12:54:57 2014 -0400 + + Fix build + + src/hb-ot-shape-complex-arabic-win1256.hh | 3 +++ + 1 file changed, 3 insertions(+) + +commit d457e3f0ff9b27616a34e4cc110d3edbf8796841 +Author: Behdad Esfahbod +Date: Mon Aug 25 12:31:19 2014 -0400 + + [arabic] Don't #include __FILE__ + + Fine! + + https://code.google.com/p/chromium/issues/detail?id=406957 + + src/hb-ot-shape-complex-arabic-win1256.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9ceb673d9c35bb28c9b2ed5359bdd8b23fda0019 +Author: Behdad Esfahbod +Date: Mon Aug 25 11:48:12 2014 -0400 + + [arabic] Allow disabling win1256 fallback code + + By defining HB_NO_WIN1256. + + src/hb-ot-shape-complex-arabic-fallback.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8a9319502141c09695461c386e54f998250420e9 +Author: Behdad Esfahbod +Date: Fri Aug 22 12:06:57 2014 -0400 + + [ot] Prefer Windows platform cmap tables / accept all Unicode + encodingIDs + + Some fonts on the Mac ship with (0,1). + + src/hb-ot-font.cc | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit 270971a0fccdf4964fd3e8ab8e5cf53037a3518d +Author: Behdad Esfahbod +Date: Fri Aug 15 14:28:04 2014 -0400 + + [win32] Avoid preprocessor warnings re macros + + src/hb-private.hh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 8c6bd34d38fb3007c3d660fce0095cc5c7e9962e +Author: Behdad Esfahbod +Date: Thu Aug 14 13:33:37 2014 -0400 + + Fix check-symbols on OS X + + src/check-libstdc++.sh | 14 +++++++------- + src/check-symbols.sh | 8 +++++++- + 2 files changed, 14 insertions(+), 8 deletions(-) + +commit 522b1cc5261c1419166bfb90d2ff634b684be66a +Author: Behdad Esfahbod +Date: Thu Aug 14 13:29:30 2014 -0400 + + [coretext] Hide feature_mappings + + src/hb-coretext.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0d2c2f238bf0a847ecd55a70cc0f081f18a053ac +Author: Behdad Esfahbod +Date: Thu Aug 14 13:25:55 2014 -0400 + + Simplify hb-object + + src/hb-object-private.hh | 118 + +++++++++++++++-------------------------------- + 1 file changed, 36 insertions(+), 82 deletions(-) + +commit 9d861b81f349188a4507350398786a6e94038095 +Author: Behdad Esfahbod +Date: Thu Aug 14 13:15:21 2014 -0400 + + Really fix clang build this time + + src/hb-object-private.hh | 141 + +++++++++++++++++++++++------------------------ + 1 file changed, 68 insertions(+), 73 deletions(-) + +commit 272226f294382b0c6921b36e0e67fc53daa765d3 +Author: Behdad Esfahbod +Date: Thu Aug 14 13:11:33 2014 -0400 + + Revert "Fix build on clang after previous commit" + + This reverts commit 9c80cbc87f23040a334e30c750f64523d9ef10c8. + + src/hb-object-private.hh | 34 +++++++++++++--------------------- + 1 file changed, 13 insertions(+), 21 deletions(-) + +commit 9c80cbc87f23040a334e30c750f64523d9ef10c8 +Author: Behdad Esfahbod +Date: Thu Aug 14 13:09:52 2014 -0400 + + Fix build on clang after previous commit + + src/hb-object-private.hh | 34 +++++++++++++++++++++------------- + 1 file changed, 21 insertions(+), 13 deletions(-) + +commit a5a27073cfff91c4f80209ca8462543130af61dd +Author: Behdad Esfahbod +Date: Thu Aug 14 13:05:36 2014 -0400 + + Rewrite this==NULL checks to avoid undefined behavior + + Fixes https://code.google.com/p/chromium/issues/detail?id=403594 + + src/hb-object-private.hh | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) + +commit cc3b2d432b02f9381cdf19e2dd5fbbdd002a750c +Author: Behdad Esfahbod +Date: Thu Aug 14 12:59:16 2014 -0400 + + Remove this==NULL check from face->reference_table() + + Not supposed to happen, and apparently this is undefined in C++. + https://code.google.com/p/chromium/issues/detail?id=403594 + + src/hb-face-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit cd7ea4f791dc41d62ad238673e2ea0107883c9e3 +Author: Behdad Esfahbod +Date: Thu Aug 14 12:57:02 2014 -0400 + + Make hb_object_t members private + + In preparation for fixing: + https://code.google.com/p/chromium/issues/detail?id=403594 + + src/hb-object-private.hh | 26 +++++++++++++++++++++----- + src/hb-set-private.hh | 2 +- + 2 files changed, 22 insertions(+), 6 deletions(-) + +commit c4308f895aef93ed884fd54e4ebc65b6d2cfc94a +Author: Behdad Esfahbod +Date: Wed Aug 13 19:42:01 2014 -0400 + + Minor + + test/shaping/hb_test_tools.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + commit cd5a1149d980dc3c17b6bb9d961c761b2671ba1b Author: Behdad Esfahbod -Date: Wed Aug 13 12:39:34 2014 -0400 +Date: Wed Aug 13 12:39:34 2014 -0400 0.9.35 - NEWS | 29 +++++++++++++++++++++++++++++ + NEWS | 29 +++++++++++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) commit 20076cc41e673c31305fcb58d37b3b292fd35f83 Author: Behdad Esfahbod -Date: Tue Aug 12 19:26:35 2014 -0400 +Date: Tue Aug 12 19:26:35 2014 -0400 [coretext] Add version guards for kCTLanguageAttributeName @@ -19,7 +1906,7 @@ Date: Tue Aug 12 19:26:35 2014 -0400 commit 1b3011c27df531875d432e909ae6b77f115c5017 Author: Behdad Esfahbod -Date: Tue Aug 12 19:17:19 2014 -0400 +Date: Tue Aug 12 19:17:19 2014 -0400 [coretext] Pass buffer language to CoreText @@ -28,7 +1915,7 @@ Date: Tue Aug 12 19:17:19 2014 -0400 commit 3eb6a4dbf25b11fce5e0e426e89f7457887aeca0 Author: Behdad Esfahbod -Date: Tue Aug 12 19:10:33 2014 -0400 +Date: Tue Aug 12 19:10:33 2014 -0400 [coretext] Minor @@ -37,7 +1924,7 @@ Date: Tue Aug 12 19:10:33 2014 -0400 commit 08acfe0d3a1d8223a9fa0696703fff63d6c2ea8b Author: Behdad Esfahbod -Date: Tue Aug 12 18:57:08 2014 -0400 +Date: Tue Aug 12 18:57:08 2014 -0400 [hb-coretext] Fix cluster order of notdef runs in RTL text @@ -46,7 +1933,7 @@ Date: Tue Aug 12 18:57:08 2014 -0400 commit 30eed75de24ac0b6648a72d98d10bb24a563d7ef Author: Behdad Esfahbod -Date: Tue Aug 12 17:15:09 2014 -0400 +Date: Tue Aug 12 17:15:09 2014 -0400 [shape-plan] Fix typo! @@ -59,7 +1946,7 @@ Date: Tue Aug 12 17:15:09 2014 -0400 commit dc9aba6fc53898acd7281b118cec0355d61b1df2 Author: Behdad Esfahbod -Date: Tue Aug 12 17:14:36 2014 -0400 +Date: Tue Aug 12 17:14:36 2014 -0400 [shape-plan] Better debug messages @@ -68,7 +1955,7 @@ Date: Tue Aug 12 17:14:36 2014 -0400 commit e956c65bf724a8403471362288d2361361b6ac58 Author: Behdad Esfahbod -Date: Tue Aug 12 17:03:27 2014 -0400 +Date: Tue Aug 12 17:03:27 2014 -0400 [shape-plan] Simplify macro @@ -77,7 +1964,7 @@ Date: Tue Aug 12 17:03:27 2014 -0400 commit 29e25550ce8fee3fecc42d20a45ce9c212dc59df Author: Behdad Esfahbod -Date: Tue Aug 12 17:02:59 2014 -0400 +Date: Tue Aug 12 17:02:59 2014 -0400 Fix gcc warning @@ -86,7 +1973,7 @@ Date: Tue Aug 12 17:02:59 2014 -0400 commit 8d5eebc0c6ada01128c6ee384340efdbef7ba29d Author: Behdad Esfahbod -Date: Tue Aug 12 16:50:22 2014 -0400 +Date: Tue Aug 12 16:50:22 2014 -0400 [shape-plan] Fix shape-plan caching with more than one requested shaper @@ -100,7 +1987,7 @@ Date: Tue Aug 12 16:50:22 2014 -0400 commit bc3d0dc60104f1cda465a5e8ba5b40ed5bec70b9 Author: Behdad Esfahbod -Date: Tue Aug 12 16:49:18 2014 -0400 +Date: Tue Aug 12 16:49:18 2014 -0400 [shape-plan] Add debug tracing @@ -109,7 +1996,7 @@ Date: Tue Aug 12 16:49:18 2014 -0400 commit 81b8d9777b9c38c7e6408591763a4cac6de18e4b Author: Behdad Esfahbod -Date: Tue Aug 12 15:49:47 2014 -0400 +Date: Tue Aug 12 15:49:47 2014 -0400 [coretext] Fix buffer resizing @@ -120,7 +2007,7 @@ Date: Tue Aug 12 15:49:47 2014 -0400 commit c3e924fb9e0e2d4003790817655efd9c5688c7e1 Author: Behdad Esfahbod -Date: Tue Aug 12 14:25:11 2014 -0400 +Date: Tue Aug 12 14:25:11 2014 -0400 [coretext] Rewind scratch-allocated arrays when not needed anymore @@ -129,7 +2016,7 @@ Date: Tue Aug 12 14:25:11 2014 -0400 commit 8fd4d70b1450d7261a35ab3dea1c70baea2e5c99 Author: Behdad Esfahbod -Date: Tue Aug 12 13:12:31 2014 -0400 +Date: Tue Aug 12 13:12:31 2014 -0400 [wince] Two more Windows CE fixes @@ -138,12 +2025,12 @@ Date: Tue Aug 12 13:12:31 2014 -0400 https://codereview.qt-project.org/#/c/92087/ src/hb-mutex-private.hh | 2 +- - src/hb-private.hh | 2 ++ + src/hb-private.hh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit fd0001d7dbe6ede99a9f87f96f231ffb53303be8 Author: Behdad Esfahbod -Date: Tue Aug 12 10:32:41 2014 -0400 +Date: Tue Aug 12 10:32:41 2014 -0400 [coretext] Compare CGFont and PS name, if CTFont didn't match @@ -163,7 +2050,7 @@ Date: Tue Aug 12 10:32:41 2014 -0400 commit 5a0eed3b50629be4826e4e9428f2c3255195395d Author: Behdad Esfahbod -Date: Mon Aug 11 23:47:16 2014 -0400 +Date: Mon Aug 11 23:47:16 2014 -0400 [coretext] Implement vertical shaping @@ -177,7 +2064,7 @@ Date: Mon Aug 11 23:47:16 2014 -0400 commit 1b55077f03758e49f93b8bc1de678e96ea58718c Author: Behdad Esfahbod -Date: Mon Aug 11 20:45:12 2014 -0400 +Date: Mon Aug 11 20:45:12 2014 -0400 [coretext] Remove unnecessary alt_size @@ -188,7 +2075,7 @@ Date: Mon Aug 11 20:45:12 2014 -0400 commit 10b1104d791a0b0103c6bbb083b5819f2b7d328d Author: Behdad Esfahbod -Date: Mon Aug 11 20:02:45 2014 -0400 +Date: Mon Aug 11 20:02:45 2014 -0400 [coretext] Use CFRunStatus @@ -200,7 +2087,7 @@ Date: Mon Aug 11 20:02:45 2014 -0400 commit fd1a6aa8d029c701b1532efa59ce901109cfc216 Author: Behdad Esfahbod -Date: Mon Aug 11 20:01:37 2014 -0400 +Date: Mon Aug 11 20:01:37 2014 -0400 [coretext] Minor @@ -209,7 +2096,7 @@ Date: Mon Aug 11 20:01:37 2014 -0400 commit 130856c705641aa681307b5b51b5fb84e295f382 Author: Behdad Esfahbod -Date: Mon Aug 11 19:16:26 2014 -0400 +Date: Mon Aug 11 19:16:26 2014 -0400 [coretext] Remove debug printf! @@ -218,7 +2105,7 @@ Date: Mon Aug 11 19:16:26 2014 -0400 commit b5fbc3b8f560235d014c62e49220574ffcf89349 Author: Behdad Esfahbod -Date: Mon Aug 11 18:40:01 2014 -0400 +Date: Mon Aug 11 18:40:01 2014 -0400 API: Do not clear buffer-flags in hb_buffer_clear_contents() @@ -231,13 +2118,13 @@ Date: Mon Aug 11 18:40:01 2014 -0400 Tests updated. src/hb-buffer-private.hh | 4 +--- - src/hb-buffer.cc | 4 ++-- + src/hb-buffer.cc | 4 ++-- test/api/test-buffer.c | 15 ++++++++++++--- 3 files changed, 15 insertions(+), 8 deletions(-) commit 104484cefeca03d95837bba5f39178693c86ce8a Author: Behdad Esfahbod -Date: Mon Aug 11 18:23:43 2014 -0400 +Date: Mon Aug 11 18:23:43 2014 -0400 Minor @@ -246,7 +2133,7 @@ Date: Mon Aug 11 18:23:43 2014 -0400 commit 4acce77db7dd588ba277779c4997b0256ebe426e Author: Behdad Esfahbod -Date: Mon Aug 11 17:46:50 2014 -0400 +Date: Mon Aug 11 17:46:50 2014 -0400 [coretext] Pass buffer direction to CoreText @@ -257,7 +2144,7 @@ Date: Mon Aug 11 17:46:50 2014 -0400 commit 5ec45dd37caa8a87ce2689a66272ba8a343fe6ba Author: Behdad Esfahbod -Date: Mon Aug 11 17:46:12 2014 -0400 +Date: Mon Aug 11 17:46:12 2014 -0400 [coretext] Minor @@ -269,7 +2156,7 @@ Date: Mon Aug 11 17:46:12 2014 -0400 commit 624a299b829ccf9864dd2f3001b1a49476e96b4a Author: Behdad Esfahbod -Date: Mon Aug 11 15:29:18 2014 -0400 +Date: Mon Aug 11 15:29:18 2014 -0400 [coretext] Attach marks to base clusters @@ -281,7 +2168,7 @@ Date: Mon Aug 11 15:29:18 2014 -0400 commit 3c41ccb5358b0be6cc68d49f436d2cb1792cd5e5 Author: Behdad Esfahbod -Date: Mon Aug 11 15:11:59 2014 -0400 +Date: Mon Aug 11 15:11:59 2014 -0400 [coretext] Use input clusters @@ -295,7 +2182,7 @@ Date: Mon Aug 11 15:11:59 2014 -0400 commit a6b8dc87421de33746b0b14d86d2d1532aec02af Author: Behdad Esfahbod -Date: Mon Aug 11 15:08:19 2014 -0400 +Date: Mon Aug 11 15:08:19 2014 -0400 [coretext] Fix buffer resize handling @@ -304,13 +2191,13 @@ Date: Mon Aug 11 15:08:19 2014 -0400 shaper to retry from (almost) scratch. src/hb-buffer-private.hh | 3 + - src/hb-coretext.cc | 428 + src/hb-coretext.cc | 428 ++++++++++++++++++++++++++--------------------- 2 files changed, 238 insertions(+), 193 deletions(-) commit 9b3c60c88b118f01610ae7a608b138f79f2dc7be Author: Behdad Esfahbod -Date: Mon Aug 11 13:25:43 2014 -0400 +Date: Mon Aug 11 13:25:43 2014 -0400 [coretext] Always compute log_clusters @@ -321,7 +2208,7 @@ Date: Mon Aug 11 13:25:43 2014 -0400 commit 15c633dd1f412f9ef839d80a8f7af35e7ea48fbc Author: Behdad Esfahbod -Date: Mon Aug 11 13:42:42 2014 -0400 +Date: Mon Aug 11 13:42:42 2014 -0400 Minor @@ -331,7 +2218,7 @@ Date: Mon Aug 11 13:42:42 2014 -0400 commit 9ce067c77524a9ffc77ceabcba5e7dab36fd39de Author: Behdad Esfahbod -Date: Mon Aug 11 02:04:38 2014 -0400 +Date: Mon Aug 11 02:04:38 2014 -0400 [coretext] Simplify cluster mapping @@ -340,7 +2227,7 @@ Date: Mon Aug 11 02:04:38 2014 -0400 commit 49f7fb63761e4ca9936990fb90a77fd3600f5ad2 Author: Behdad Esfahbod -Date: Sun Aug 10 19:19:38 2014 -0400 +Date: Sun Aug 10 19:19:38 2014 -0400 [coretext] Minor @@ -349,7 +2236,7 @@ Date: Sun Aug 10 19:19:38 2014 -0400 commit 25f4fb9b56bb3f8bec821571c78f8829e40daa54 Author: Behdad Esfahbod -Date: Sun Aug 10 19:05:25 2014 -0400 +Date: Sun Aug 10 19:05:25 2014 -0400 [coretext] Fix fallback detection @@ -360,7 +2247,7 @@ Date: Sun Aug 10 19:05:25 2014 -0400 commit 77a7a53acef7de355116d488e7d64ff1d7e9e9e1 Author: Behdad Esfahbod -Date: Sun Aug 10 18:59:47 2014 -0400 +Date: Sun Aug 10 18:59:47 2014 -0400 [coretext] Fix last range @@ -374,7 +2261,7 @@ Date: Sun Aug 10 18:59:47 2014 -0400 commit c2b151d95262a8dc2d2ce94e19ab0ef5b0c8f98d Author: Behdad Esfahbod -Date: Sun Aug 10 18:52:07 2014 -0400 +Date: Sun Aug 10 18:52:07 2014 -0400 Fix hb_in_range() for types smaller than int @@ -385,7 +2272,7 @@ Date: Sun Aug 10 18:52:07 2014 -0400 commit 26a963b9cb4af3119177f277a2d48a5d537458fb Author: Behdad Esfahbod -Date: Sun Aug 10 18:04:50 2014 -0400 +Date: Sun Aug 10 18:04:50 2014 -0400 [wince] Try to fix some stuff on Windows CE @@ -399,7 +2286,7 @@ Date: Sun Aug 10 18:04:50 2014 -0400 commit 92aeee3f040c2c32cbf70b27bd6954535388c870 Author: Behdad Esfahbod -Date: Sun Aug 10 17:42:19 2014 -0400 +Date: Sun Aug 10 17:42:19 2014 -0400 Minor @@ -409,7 +2296,7 @@ Date: Sun Aug 10 17:42:19 2014 -0400 commit b9993d8d6d332994dfbd29e99ff8043622003417 Author: Behdad Esfahbod -Date: Sun Aug 10 17:40:24 2014 -0400 +Date: Sun Aug 10 17:40:24 2014 -0400 [coretext] Fix assert on Yosemite @@ -423,7 +2310,7 @@ Date: Sun Aug 10 17:40:24 2014 -0400 commit 087733dd66e17297ef0e53680fafe42c84884104 Author: Behdad Esfahbod -Date: Fri Apr 18 11:21:08 2014 -0700 +Date: Fri Apr 18 11:21:08 2014 -0700 [coretext] Use CGFont as face_data @@ -432,7 +2319,7 @@ Date: Fri Apr 18 11:21:08 2014 -0700 commit d277c3d7eee1fd4fb41c38255e5c4df539353e89 Author: Behdad Esfahbod -Date: Thu Aug 7 15:38:52 2014 -0400 +Date: Thu Aug 7 15:38:52 2014 -0400 [arabic] Bug 82306 - Mandaic had errors in its Unicode Joining_Type @@ -443,7 +2330,7 @@ Date: Thu Aug 7 15:38:52 2014 -0400 commit 38fb30d7420a4b01f99cee31baa8c3990a1d1c5f Author: Behdad Esfahbod -Date: Wed Aug 6 13:34:49 2014 -0400 +Date: Wed Aug 6 13:34:49 2014 -0400 Use atexit() only if it's safe to call from shared library @@ -454,17 +2341,17 @@ Date: Wed Aug 6 13:34:49 2014 -0400 https://bugs.freedesktop.org/show_bug.cgi?id=82246 - src/hb-common.cc | 4 ++-- - src/hb-ft.cc | 2 +- + src/hb-common.cc | 4 ++-- + src/hb-ft.cc | 2 +- src/hb-private.hh | 25 +++++++++++++++++++++++++ - src/hb-shape.cc | 2 +- - src/hb-shaper.cc | 2 +- - src/hb-uniscribe.cc | 2 +- + src/hb-shape.cc | 2 +- + src/hb-shaper.cc | 2 +- + src/hb-uniscribe.cc | 2 +- 6 files changed, 31 insertions(+), 6 deletions(-) commit d5e61470fa8e5046c35a79988e00e012ae4fff0f Author: Behdad Esfahbod -Date: Tue Aug 5 14:19:01 2014 -0400 +Date: Tue Aug 5 14:19:01 2014 -0400 [arabic] Fix fallback shaping regression @@ -474,28 +2361,28 @@ Date: Tue Aug 5 14:19:01 2014 -0400 Micro-test added. - src/hb-ot-shape-complex-arabic.cc | 4 ++-- - test/shaping/Makefile.am | 1 + - test/shaping/fonts/sha1sum/MANIFEST | 1 + + src/hb-ot-shape-complex-arabic.cc | 4 ++-- + test/shaping/Makefile.am | 1 + + test/shaping/fonts/sha1sum/MANIFEST | 1 + .../sha1sum/df768b9c257e0c9c35786c47cae15c46571d56be.ttf | Bin 0 -> 6332 bytes - test/shaping/tests/MANIFEST | 1 + - test/shaping/tests/arabic-fallback-shaping.tests | 1 + + test/shaping/tests/MANIFEST | 1 + + test/shaping/tests/arabic-fallback-shaping.tests | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) commit 91c2c0fd2b0f660d79744b3dfaf39ab86883e96b Author: Behdad Esfahbod -Date: Sat Aug 2 19:24:55 2014 -0400 +Date: Sat Aug 2 19:24:55 2014 -0400 0.9.34 - NEWS | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + NEWS | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) commit d7c850f8037d2701366008eb8c2a527c9d40abde Author: Behdad Esfahbod -Date: Sat Aug 2 17:46:38 2014 -0400 +Date: Sat Aug 2 17:46:38 2014 -0400 [uniscribe] Minor @@ -504,29 +2391,29 @@ Date: Sat Aug 2 17:46:38 2014 -0400 commit 8f3eebf7ee4005f9a8efaafcb7f4058cc0a3756e Author: Behdad Esfahbod -Date: Sat Aug 2 17:18:46 2014 -0400 +Date: Sat Aug 2 17:18:46 2014 -0400 Make sure gsubgpos buffer vars are available during fallback_position Add buffer var allocation asserts to a few key places. - src/hb-ot-layout-gpos-table.hh | 4 ++-- - src/hb-ot-layout-gsub-table.hh | 2 +- - src/hb-ot-layout-private.hh | 15 +++++++++++++++ + src/hb-ot-layout-gpos-table.hh | 4 ++-- + src/hb-ot-layout-gsub-table.hh | 2 +- + src/hb-ot-layout-private.hh | 15 +++++++++++++++ src/hb-ot-shape-complex-arabic-fallback.hh | 2 +- - src/hb-ot-shape-fallback.cc | 2 ++ - src/hb-ot-shape-normalize.cc | 2 ++ - src/hb-ot-shape.cc | 3 +++ + src/hb-ot-shape-fallback.cc | 2 ++ + src/hb-ot-shape-normalize.cc | 2 ++ + src/hb-ot-shape.cc | 3 +++ 7 files changed, 26 insertions(+), 4 deletions(-) commit 2053f369f84676f197ac41ea654a318c48922abd Author: Behdad Esfahbod -Date: Sat Aug 2 16:31:16 2014 -0400 +Date: Sat Aug 2 16:31:16 2014 -0400 Disable 'liga' for vertical text The reason we turned it on is because Kazuraki uses it. But that's - not reason enough. Until the OpenType spec gets its act together re + not reason enough. Until the OpenType spec gets its act together re adding design-direction to lookups, this is better user experience. src/hb-ot-shape.cc | 2 +- @@ -534,7 +2421,7 @@ Date: Sat Aug 2 16:31:16 2014 -0400 commit 763e5466c0a03a7c27020e1e2598e488612529a7 Author: Behdad Esfahbod -Date: Sat Aug 2 16:17:44 2014 -0400 +Date: Sat Aug 2 16:17:44 2014 -0400 Make it easier to use HB_BUFFER_FLAG_BOT/EOT @@ -544,23 +2431,23 @@ Date: Sat Aug 2 16:17:44 2014 -0400 had code like this: hb_buffer_set_flags (hb_buffer, - (item_offset == 0 ? HB_BUFFER_FLAG_BOT : 0) | - (item_offset + item_length == paragraph_length - ? - HB_BUFFER_FLAG_EOT : 0)); + (item_offset == 0 ? HB_BUFFER_FLAG_BOT : 0) | + (item_offset + item_length == paragraph_length + ? + HB_BUFFER_FLAG_EOT : 0)); hb_buffer_add_utf8 (hb_buffer, - paragraph_text, paragraph_length, - item_offset, item_length); + paragraph_text, paragraph_length, + item_offset, item_length); After this change such clients can simply say: hb_buffer_set_flags (hb_buffer, - HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT); + HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT); hb_buffer_add_utf8 (hb_buffer, - paragraph_text, paragraph_length, - item_offset, item_length); + paragraph_text, paragraph_length, + item_offset, item_length); Ie, HarfBuzz itself checks whether the segment is at the beginning/end of the paragraph. Clients that only pass item-at-a-time to HarfBuzz @@ -572,19 +2459,19 @@ Date: Sat Aug 2 16:17:44 2014 -0400 src/hb-ot-shape-complex-arabic.cc | 40 +++++++++++++++++++-------------------- - src/hb-ot-shape.cc | 1 + + src/hb-ot-shape.cc | 1 + 2 files changed, 20 insertions(+), 21 deletions(-) commit 0a5ae9336231c4d189e1682e4fd9c9c4552b8bbf Merge: ac53443 6ab6be3 Author: Behdad Esfahbod -Date: Sat Aug 2 15:00:34 2014 -0400 +Date: Sat Aug 2 15:00:34 2014 -0400 Merge branch 'win1256' commit 6ab6be32c5857ce3344021ad2996e80b2a8c8f99 Author: Behdad Esfahbod -Date: Sat Aug 2 14:58:38 2014 -0400 +Date: Sat Aug 2 14:58:38 2014 -0400 [arabic/win1256] Remove unused MultipleSubst macros @@ -593,7 +2480,7 @@ Date: Sat Aug 2 14:58:38 2014 -0400 commit abfa4252cce1c56c472693dcd8400cd97ededd2f Author: Behdad Esfahbod -Date: Fri Aug 1 19:05:33 2014 -0400 +Date: Fri Aug 1 19:05:33 2014 -0400 [arabic/win1256] Really fix lam-alef this time @@ -607,7 +2494,7 @@ Date: Fri Aug 1 19:05:33 2014 -0400 commit 55977f2a462b7fa1248eab3787053dc82320d3e5 Author: Behdad Esfahbod -Date: Fri Aug 1 16:14:33 2014 -0400 +Date: Fri Aug 1 16:14:33 2014 -0400 [arabic/win1256] Hook up lamMedi lookup @@ -622,7 +2509,7 @@ Date: Fri Aug 1 16:14:33 2014 -0400 commit e839e2523e64fd0cf21929f6a45e2facd59c7917 Author: Behdad Esfahbod -Date: Fri Aug 1 16:09:31 2014 -0400 +Date: Fri Aug 1 16:09:31 2014 -0400 [arabic/win1256] Fix TEH MARBUTA final form @@ -633,7 +2520,7 @@ Date: Fri Aug 1 16:09:31 2014 -0400 commit a2de193220ee2839125594bd1a60b5b66ab4598e Author: Behdad Esfahbod -Date: Thu Jul 31 18:21:05 2014 -0400 +Date: Thu Jul 31 18:21:05 2014 -0400 [arabic/win1256] Fix shaping of JEEM, HAH, and KHAH @@ -644,7 +2531,7 @@ Date: Thu Jul 31 18:21:05 2014 -0400 commit 1789ccb1dd56af6117eac00e633eff94860ba252 Author: Behdad Esfahbod -Date: Thu Jul 31 11:04:00 2014 -0400 +Date: Thu Jul 31 11:04:00 2014 -0400 [arabic/win1256] Remove GCC'ism @@ -662,14 +2549,14 @@ Date: Thu Jul 31 11:04:00 2014 -0400 See: https://github.com/behdad/harfbuzz/commit/a97f537cec209649302899975d76ca2b2661da7a#commitcomment-7218736 - src/hb-ot-shape-complex-arabic-fallback.hh | 4 +- + src/hb-ot-shape-complex-arabic-fallback.hh | 4 +- src/hb-ot-shape-complex-arabic-win1256.hh | 123 +++++++++++++++++------------ 2 files changed, 75 insertions(+), 52 deletions(-) commit f28b1c823db2ad56fed356ef864a7508d23048b8 Author: Behdad Esfahbod -Date: Wed Jul 30 02:15:44 2014 -0400 +Date: Wed Jul 30 02:15:44 2014 -0400 [arabic] Implement Windows-1256 private shaping @@ -678,7 +2565,7 @@ Date: Wed Jul 30 02:15:44 2014 -0400 https://bugzilla.mozilla.org/show_bug.cgi?id=1045139 This is only enabled on Windows platforms, and requires support from - Uniscribe to work. But for clients that do hook up to Uniscribe, this + Uniscribe to work. But for clients that do hook up to Uniscribe, this fixes shaping of Windows-1256-encoded bitmap fonts like "MS Sans Serif". @@ -687,8 +2574,8 @@ Date: Wed Jul 30 02:15:44 2014 -0400 UNTESTED. I might even have broken regular Arabic fallback shaping. - src/Makefile.am | 1 + - src/check-includes.sh | 2 +- + src/Makefile.am | 1 + + src/check-includes.sh | 2 +- src/hb-ot-shape-complex-arabic-fallback.hh | 125 +++++++++-- src/hb-ot-shape-complex-arabic-win1256.hh | 328 +++++++++++++++++++++++++++++ @@ -696,7 +2583,7 @@ Date: Wed Jul 30 02:15:44 2014 -0400 commit ac53443f1cea83ed43a4e41a9fdb91902f7fae7b Author: Behdad Esfahbod -Date: Thu Jul 31 18:51:37 2014 -0400 +Date: Thu Jul 31 18:51:37 2014 -0400 [hangul] Don't apply 'calt' @@ -704,22 +2591,22 @@ Date: Thu Jul 31 18:51:37 2014 -0400 Micro-test added. - src/hb-ot-shape-complex-hangul.cc | 11 + src/hb-ot-shape-complex-hangul.cc | 11 ++++++++++- - test/shaping/Makefile.am | 1 + + test/shaping/Makefile.am | 1 + .../sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf | Bin 0 -> 1804 bytes .../sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf | Bin 0 -> 1644 bytes - test/shaping/fonts/sha1sum/MANIFEST | 2 ++ - test/shaping/tests/MANIFEST | 1 + - test/shaping/tests/hangul-jamo.tests | 11 + test/shaping/fonts/sha1sum/MANIFEST | 2 ++ + test/shaping/tests/MANIFEST | 1 + + test/shaping/tests/hangul-jamo.tests | 11 +++++++++++ 7 files changed, 25 insertions(+), 1 deletion(-) commit 8292f96b2be173ebceb1b54426c271cfeaecd633 Author: Behdad Esfahbod -Date: Thu Jul 31 18:33:11 2014 -0400 +Date: Thu Jul 31 18:33:11 2014 -0400 [test] Fix record-test.sh @@ -728,7 +2615,7 @@ Date: Thu Jul 31 18:33:11 2014 -0400 commit 88911e8cc765c26e502503a3a00ac7f17973f3d9 Author: Behdad Esfahbod -Date: Tue Jul 29 19:47:26 2014 -0400 +Date: Tue Jul 29 19:47:26 2014 -0400 Minor @@ -737,7 +2624,7 @@ Date: Tue Jul 29 19:47:26 2014 -0400 commit 9e834e29e0b657f0555df1ab9cea79ff7abcf08d Author: Behdad Esfahbod -Date: Sat Jul 26 20:34:01 2014 -0400 +Date: Sat Jul 26 20:34:01 2014 -0400 [hebrew] Zero mark advance by GDEF late @@ -751,16 +2638,16 @@ Date: Sat Jul 26 20:34:01 2014 -0400 Micro-test added. - src/hb-ot-shape-complex-hebrew.cc | 2 +- + src/hb-ot-shape-complex-hebrew.cc | 2 +- .../sha1sum/8454d22037f892e76614e1645d066689a0200e61.ttf | Bin 0 -> 6068 bytes - test/shaping/fonts/sha1sum/MANIFEST | 1 + - test/shaping/tests/zero-width-marks.tests | 1 + + test/shaping/fonts/sha1sum/MANIFEST | 1 + + test/shaping/tests/zero-width-marks.tests | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) commit 6f2d9ba52a6d1e3fc200da1ef0e85ba020fcd0dc Author: Behdad Esfahbod -Date: Sat Jul 26 19:17:44 2014 -0400 +Date: Sat Jul 26 19:17:44 2014 -0400 Add old-Myanmar shaper @@ -773,30 +2660,30 @@ Date: Sat Jul 26 19:17:44 2014 -0400 Micro-test added based on Padauk. - src/hb-ot-shape-complex-myanmar.cc | 18 + src/hb-ot-shape-complex-myanmar.cc | 18 ++++++++++++++++++ - src/hb-ot-shape-complex-private.hh | 5 +++-- - test/shaping/Makefile.am | 1 + - test/shaping/fonts/sha1sum/MANIFEST | 1 + + src/hb-ot-shape-complex-private.hh | 5 +++-- + test/shaping/Makefile.am | 1 + + test/shaping/fonts/sha1sum/MANIFEST | 1 + .../bb9473d2403488714043bcfb946c9f78b86ad627.ttf | Bin 0 -> 3440 bytes - test/shaping/tests/MANIFEST | 1 + - test/shaping/tests/zero-width-marks.tests | 1 + + test/shaping/tests/MANIFEST | 1 + + test/shaping/tests/zero-width-marks.tests | 1 + 7 files changed, 25 insertions(+), 2 deletions(-) commit 595d2b96c37de8147489dc5e0ddcc4ab1ad3eea9 Author: Behdad Esfahbod -Date: Sat Jul 26 18:44:15 2014 -0400 +Date: Sat Jul 26 18:44:15 2014 -0400 Minor src/hb-ot-shape-complex-indic.cc | 1 + - src/hb-ot-shape.cc | 2 +- + src/hb-ot-shape.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit fe6788bc570d77d5b3aafc68efd51ca6b80499b1 Author: Behdad Esfahbod -Date: Fri Jul 25 12:40:56 2014 -0400 +Date: Fri Jul 25 12:40:56 2014 -0400 Typo @@ -805,7 +2692,7 @@ Date: Fri Jul 25 12:40:56 2014 -0400 commit 0de25d4184d2d92b1a2ebb6fa054275aaae4c316 Author: Behdad Esfahbod -Date: Fri Jul 25 12:35:03 2014 -0400 +Date: Fri Jul 25 12:35:03 2014 -0400 [util] Note CSS compatibility in --help-features @@ -814,7 +2701,7 @@ Date: Fri Jul 25 12:35:03 2014 -0400 commit 6e69200a2aadbc6bba35ffb4a058c14286b84f46 Author: Behdad Esfahbod -Date: Fri Jul 25 12:30:47 2014 -0400 +Date: Fri Jul 25 12:30:47 2014 -0400 Fix snprintf() format @@ -826,7 +2713,7 @@ Date: Fri Jul 25 12:30:47 2014 -0400 commit 5c5cdbbdf8be231c433e21b050a6c6991d327b61 Author: Behdad Esfahbod -Date: Fri Jul 25 12:21:49 2014 -0400 +Date: Fri Jul 25 12:21:49 2014 -0400 Make sure broken feature strings are not partially parsed @@ -838,7 +2725,7 @@ Date: Fri Jul 25 12:21:49 2014 -0400 commit a795fe637846e0d9561d2f7cdd84cfafd58b23a7 Author: Behdad Esfahbod -Date: Fri Jul 25 12:15:33 2014 -0400 +Date: Fri Jul 25 12:15:33 2014 -0400 Allow quotation marks around feature tag in hb_feature_from_string() @@ -849,7 +2736,7 @@ Date: Fri Jul 25 12:15:33 2014 -0400 commit 3f6461847412e78bcddc8eba97200f3afcde869a Author: Behdad Esfahbod -Date: Fri Jul 25 12:04:27 2014 -0400 +Date: Fri Jul 25 12:04:27 2014 -0400 Allow space at the end of feature string with values, eg 'dlig=1 ' @@ -858,7 +2745,7 @@ Date: Fri Jul 25 12:04:27 2014 -0400 commit f31f7d2259dd8edffc070af55938cb7aa23514c1 Author: Behdad Esfahbod -Date: Fri Jul 25 12:03:52 2014 -0400 +Date: Fri Jul 25 12:03:52 2014 -0400 Minor @@ -867,7 +2754,7 @@ Date: Fri Jul 25 12:03:52 2014 -0400 commit 60cb18a5dea2d30793f89e80995bb729c014864a Author: Behdad Esfahbod -Date: Fri Jul 25 12:01:22 2014 -0400 +Date: Fri Jul 25 12:01:22 2014 -0400 Allow on/off in hb_feature_from_string() @@ -878,7 +2765,7 @@ Date: Fri Jul 25 12:01:22 2014 -0400 commit d9e618eca9e01c2eb6db65504af3f73be370a1e7 Author: Behdad Esfahbod -Date: Fri Jul 25 11:56:01 2014 -0400 +Date: Fri Jul 25 11:56:01 2014 -0400 Remove duplicate definition of ISALNUM @@ -889,7 +2776,7 @@ Date: Fri Jul 25 11:56:01 2014 -0400 commit 2ee5f665ded86147acedc400153c0b3a90fe07c6 Author: Behdad Esfahbod -Date: Fri Jul 25 11:53:46 2014 -0400 +Date: Fri Jul 25 11:53:46 2014 -0400 Fix parsing of features like "- liga" (with the space) @@ -898,7 +2785,7 @@ Date: Fri Jul 25 11:53:46 2014 -0400 commit e15fa7a8cffbe6a67b1048d7b87b7df77d8b1686 Author: Behdad Esfahbod -Date: Fri Jul 25 11:44:35 2014 -0400 +Date: Fri Jul 25 11:44:35 2014 -0400 Do not require the '=' in hb_feature_from_string() @@ -909,7 +2796,7 @@ Date: Fri Jul 25 11:44:35 2014 -0400 commit f4fe9baefdb7e0ff9946f88b6f4b55738fa30cdf Author: Behdad Esfahbod -Date: Fri Jul 25 11:39:55 2014 -0400 +Date: Fri Jul 25 11:39:55 2014 -0400 Reject tags longer than 4 chars in hb_feature_from_string() @@ -918,22 +2805,22 @@ Date: Fri Jul 25 11:39:55 2014 -0400 commit 7e8c38954649c0bf2e6051d84ca08dce090ec169 Author: Behdad Esfahbod -Date: Fri Jul 25 11:18:11 2014 -0400 +Date: Fri Jul 25 11:18:11 2014 -0400 Minor warnings fixes Some systems insist on -Wmissing-field-initializers. We have too many, - by design. Fix a few easy ones. + by design. Fix a few easy ones. src/hb-open-type-private.hh | 2 +- src/hb-ot-layout-private.hh | 2 +- - src/hb-private.hh | 2 +- + src/hb-private.hh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit fc0daafab0336b847ac14682e581a8838f36a0bf Author: Behdad Esfahbod -Date: Wed Jul 23 16:48:51 2014 -0400 +Date: Wed Jul 23 16:48:51 2014 -0400 [indic] Handle old-spec Malayalam reordering with final Halant @@ -941,20 +2828,20 @@ Date: Wed Jul 23 16:48:51 2014 -0400 Micro-tests added. - src/hb-ot-shape-complex-indic.cc | 28 + src/hb-ot-shape-complex-indic.cc | 28 +++++++++++++++++---- - test/shaping/Makefile.am | 1 + + test/shaping/Makefile.am | 1 + .../270b89df543a7e48e206a2d830c0e10e5265c630.ttf | Bin 0 -> 3428 bytes .../57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf | Bin 0 -> 2272 bytes - test/shaping/fonts/sha1sum/MANIFEST | 2 ++ - test/shaping/tests/MANIFEST | 1 + - test/shaping/tests/indic-old-spec.tests | 2 ++ - .../indic/script-malayalam/misc/misc.txt | 1 + + test/shaping/fonts/sha1sum/MANIFEST | 2 ++ + test/shaping/tests/MANIFEST | 1 + + test/shaping/tests/indic-old-spec.tests | 2 ++ + .../indic/script-malayalam/misc/misc.txt | 1 + 8 files changed, 30 insertions(+), 5 deletions(-) commit d6d349d17898529ecdf8217a54987a3e9f81ce05 Author: Behdad Esfahbod -Date: Wed Jul 23 11:38:49 2014 -0400 +Date: Wed Jul 23 11:38:49 2014 -0400 Give CC to gir-scanner @@ -966,17 +2853,17 @@ Date: Wed Jul 23 11:38:49 2014 -0400 commit 8c1bdb46facb79cfca5ebfea9a7e467b40337f47 Author: Behdad Esfahbod -Date: Tue Jul 22 17:56:43 2014 -0400 +Date: Tue Jul 22 17:56:43 2014 -0400 0.9.33 - NEWS | 10 ++++++++++ + NEWS | 10 ++++++++++ configure.ac | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) commit d218bdb26b226fbf68331eb586b24460c061313d Author: Behdad Esfahbod -Date: Tue Jul 22 18:01:46 2014 -0400 +Date: Tue Jul 22 18:01:46 2014 -0400 Fix test runner under Windows @@ -985,7 +2872,7 @@ Date: Tue Jul 22 18:01:46 2014 -0400 commit 3f310dc0cae9015c45ba642b9b83d5695c807aad Author: Behdad Esfahbod -Date: Tue Jul 22 16:26:27 2014 -0400 +Date: Tue Jul 22 16:26:27 2014 -0400 Disallow changing settings on immutable face @@ -998,7 +2885,7 @@ Date: Tue Jul 22 16:26:27 2014 -0400 commit 0fc0a1022854324261fea8893678a3e9fd9443eb Author: Behdad Esfahbod -Date: Mon Jul 21 11:12:54 2014 -0400 +Date: Mon Jul 21 11:12:54 2014 -0400 [win] Fix Cygwin build @@ -1009,7 +2896,7 @@ Date: Mon Jul 21 11:12:54 2014 -0400 commit 1132a7dd0ecf1c425078e39e5471330bace42659 Author: Behdad Esfahbod -Date: Sun Jul 20 01:17:40 2014 -0400 +Date: Sun Jul 20 01:17:40 2014 -0400 Add HB_TAG_MAX_SIGNED / _HB_SCRIPT_MAX_VALUE_SIGNED @@ -1020,7 +2907,7 @@ Date: Sun Jul 20 01:17:40 2014 -0400 commit df99976398a53521e0228541055dcaee8f5ba87f Author: Behdad Esfahbod -Date: Sat Jul 19 17:31:23 2014 -0400 +Date: Sat Jul 19 17:31:23 2014 -0400 [gobject] Skip _HB_SCRIPT_MAX_VALUE @@ -1031,7 +2918,7 @@ Date: Sat Jul 19 17:31:23 2014 -0400 commit f1a8d50a87edfb8147aa1bec732ed7ccbfef2877 Author: Behdad Esfahbod -Date: Sat Jul 19 16:52:32 2014 -0400 +Date: Sat Jul 19 16:52:32 2014 -0400 [win] Don't define visibility attribtue under Cygwin @@ -1040,7 +2927,7 @@ Date: Sat Jul 19 16:52:32 2014 -0400 commit 9c77027d645142794c3ff1590a96bb151c3f2e91 Author: Behdad Esfahbod -Date: Sat Jul 19 16:37:22 2014 -0400 +Date: Sat Jul 19 16:37:22 2014 -0400 [win] Turn STRICT on for including windows.h @@ -1049,20 +2936,20 @@ Date: Sat Jul 19 16:37:22 2014 -0400 commit db308280488c2ee11ba865a9922eb6a0c1abeef3 Author: Behdad Esfahbod -Date: Sat Jul 19 16:32:04 2014 -0400 +Date: Sat Jul 19 16:32:04 2014 -0400 [win] Consolidate windows.h include tips and tricks src/hb-atomic-private.hh | 4 ---- src/hb-mutex-private.hh | 1 - - src/hb-private.hh | 12 ++++++++++++ - src/hb-uniscribe.cc | 3 --- - src/hb-uniscribe.h | 3 --- + src/hb-private.hh | 12 ++++++++++++ + src/hb-uniscribe.cc | 3 --- + src/hb-uniscribe.h | 3 --- 5 files changed, 12 insertions(+), 11 deletions(-) commit f26d59d4684be3419c976d781b6dbc956248e3bb Author: Behdad Esfahbod -Date: Sat Jul 19 16:10:21 2014 -0400 +Date: Sat Jul 19 16:10:21 2014 -0400 More fixing MemoryBarrier() on Mingw32 @@ -1075,37 +2962,37 @@ Date: Sat Jul 19 16:10:21 2014 -0400 commit 00a57eb4b50fd894dc68c6525a5bbebf0ebc30e4 Author: Behdad Esfahbod -Date: Fri Jul 18 14:42:50 2014 -0400 +Date: Fri Jul 18 14:42:50 2014 -0400 [test] Remove unused micro-font - .../9d64156923a1b9fed1e05f74599c16563eca42d9.ttf | Bin 81968 -> + .../9d64156923a1b9fed1e05f74599c16563eca42d9.ttf | Bin 81968 -> 0 bytes - test/shaping/fonts/sha1sum/MANIFEST | 1 - + test/shaping/fonts/sha1sum/MANIFEST | 1 - 2 files changed, 1 deletion(-) commit ed29b15f5d0d9e7b40143926ca7d40bf645f67e9 Author: Behdad Esfahbod -Date: Fri Jul 18 14:37:49 2014 -0400 +Date: Fri Jul 18 14:37:49 2014 -0400 [test] Add more Mongolian variation selector tests From https://code.google.com/p/chromium/issues/detail?id=393896 - .../9d64156923a1b9fed1e05f74599c16563eca42d9.ttf | Bin 0 -> + .../9d64156923a1b9fed1e05f74599c16563eca42d9.ttf | Bin 0 -> 81968 bytes - test/shaping/fonts/sha1sum/MANIFEST | 2 ++ - .../bb29ce50df2bdba2d10726427c6b7609bf460e04.ttf | Bin 0 -> + test/shaping/fonts/sha1sum/MANIFEST | 2 ++ + .../bb29ce50df2bdba2d10726427c6b7609bf460e04.ttf | Bin 0 -> 74856 bytes - test/shaping/tests/mongolian-variation-selector.tests | 1 + - .../shaper-arabic/script-mongolian/misc/MANIFEST | 1 + - .../script-mongolian/misc/variation-selectors.txt | 8 ++++++++ + test/shaping/tests/mongolian-variation-selector.tests | 1 + + .../shaper-arabic/script-mongolian/misc/MANIFEST | 1 + + .../script-mongolian/misc/variation-selectors.txt | 8 ++++++++ 6 files changed, 12 insertions(+) commit 385cf37cf084198e3aedb4354a7b025938a9f11b Author: Behdad Esfahbod -Date: Thu Jul 17 18:22:07 2014 -0400 +Date: Thu Jul 17 18:22:07 2014 -0400 Fix hb_in_range() unused-var warning on Windows @@ -1114,7 +3001,7 @@ Date: Thu Jul 17 18:22:07 2014 -0400 commit e3b42f1af409c073b819bfc696024ccb1f1da63f Author: Behdad Esfahbod -Date: Thu Jul 17 17:13:54 2014 -0400 +Date: Thu Jul 17 17:13:54 2014 -0400 [arabic] Disable 'cswh' again @@ -1125,17 +3012,17 @@ Date: Thu Jul 17 17:13:54 2014 -0400 commit 66f30915b185727a0041c998641edb550eb8a7fc Author: Behdad Esfahbod -Date: Thu Jul 17 16:05:47 2014 -0400 +Date: Thu Jul 17 16:05:47 2014 -0400 0.9.32 - NEWS | 12 ++++++++++++ + NEWS | 12 ++++++++++++ configure.ac | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) commit 82f4d9d53f348f41b14b877c1ac77c0372c49caa Author: Behdad Esfahbod -Date: Thu Jul 17 15:57:37 2014 -0400 +Date: Thu Jul 17 15:57:37 2014 -0400 [arabic] Add note re disabled 'cswh' @@ -1144,7 +3031,7 @@ Date: Thu Jul 17 15:57:37 2014 -0400 commit 615d00ea252739da57edbd980ff27e573f88ee7e Author: Behdad Esfahbod -Date: Thu Jul 17 13:36:09 2014 -0400 +Date: Thu Jul 17 13:36:09 2014 -0400 [arabic] Apply init/medi/isol/fini/... in separate stages @@ -1153,20 +3040,20 @@ Date: Thu Jul 17 13:36:09 2014 -0400 Micro-tests for Arabic and Mongolian added for the latter. - src/hb-ot-shape-complex-arabic.cc | 56 + src/hb-ot-shape-complex-arabic.cc | 56 +++++++++++++-------- - test/shaping/Makefile.am | 2 + + test/shaping/Makefile.am | 2 + .../813c2f8e5512187fd982417a7fb4286728e6f4a8.ttf | Bin 0 -> 3428 bytes .../8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf | Bin 0 -> 3428 bytes - test/shaping/fonts/sha1sum/MANIFEST | 3 ++ + test/shaping/fonts/sha1sum/MANIFEST | 3 ++ .../a919b33197965846f21074b24e30250d67277bce.ttf | Bin 0 -> 12560 bytes - test/shaping/tests/MANIFEST | 1 + - test/shaping/tests/arabic-feature-order.tests | 3 ++ + test/shaping/tests/MANIFEST | 1 + + test/shaping/tests/arabic-feature-order.tests | 3 ++ 8 files changed, 43 insertions(+), 22 deletions(-) commit d21e997035b16e9807dfb29c3605abb93f92f1ee Author: Behdad Esfahbod -Date: Thu Jul 17 15:27:46 2014 -0400 +Date: Thu Jul 17 15:27:46 2014 -0400 [test] Make record_test understand cmdline args to hb-shape @@ -1175,23 +3062,23 @@ Date: Thu Jul 17 15:27:46 2014 -0400 commit 7cd33f230441093dbfb1fec48f8c580ee8d9ef71 Author: Behdad Esfahbod -Date: Thu Jul 17 14:22:11 2014 -0400 +Date: Thu Jul 17 14:22:11 2014 -0400 Micro optimization - src/hb-fallback-shape.cc | 36 + src/hb-fallback-shape.cc | 36 +++++++++++++++++++----------------- src/hb-ot-shape-complex-arabic.cc | 19 +++++++++++-------- src/hb-ot-shape-complex-indic.cc | 15 ++++++++++----- src/hb-ot-shape-complex-myanmar.cc | 7 +++++-- src/hb-ot-shape-complex-sea.cc | 7 +++++-- - src/hb-ot-shape-fallback.cc | 30 ++++++++++++++++-------------- - src/hb-ot-shape.cc | 18 ++++++++++++------ + src/hb-ot-shape-fallback.cc | 30 ++++++++++++++++-------------- + src/hb-ot-shape.cc | 18 ++++++++++++------ 7 files changed, 78 insertions(+), 54 deletions(-) commit 164c13d73f67fdddba28e6409d76b4903e8ffab3 Author: Behdad Esfahbod -Date: Thu Jul 17 14:16:38 2014 -0400 +Date: Thu Jul 17 14:16:38 2014 -0400 Another try to fix Mongolian free variation selectors @@ -1203,23 +3090,23 @@ Date: Thu Jul 17 14:16:38 2014 -0400 https://code.google.com/p/chromium/issues/detail?id=393896 - src/hb-ot-shape-complex-arabic.cc | 24 + src/hb-ot-shape-complex-arabic.cc | 24 +++++++++++++++------ - src/hb-unicode-private.hh | 3 ++- - test/shaping/fonts/sha1sum/MANIFEST | 1 + + src/hb-unicode-private.hh | 3 ++- + test/shaping/fonts/sha1sum/MANIFEST | 1 + .../ef86fe710cfea877bbe0dbb6946a1f88d0661031.ttf | Bin 0 -> 2748 bytes - .../tests/mongolian-variation-selector.tests | 1 + + .../tests/mongolian-variation-selector.tests | 1 + 5 files changed, 22 insertions(+), 7 deletions(-) commit 5209c505061130854a2bfea8849928ade3ee92f3 Author: Behdad Esfahbod -Date: Thu Jul 17 12:23:44 2014 -0400 +Date: Thu Jul 17 12:23:44 2014 -0400 Revert "Show U+FFFD REPLACEMENT CHARACTER for invalid Unicode codepoints" We now handle U+FFFD replacement in hb_buffer_add_utf*(). Any other - manipulation can happen in user callbacks. No need for this. + manipulation can happen in user callbacks. No need for this. https://github.com/behdad/harfbuzz/commit/efe74214bbb68eaa3d7621e73869b5d58210107e#commitcomment-7039404 diff --git a/Makefile.am b/Makefile.am index fa87114..47aeb97 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,7 @@ EXTRA_DIST = \ autogen.sh \ harfbuzz.doap \ Android.mk \ + README.python \ $(NULL) MAINTAINERCLEANFILES = \ @@ -18,6 +19,7 @@ MAINTAINERCLEANFILES = \ $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \ $(srcdir)/INSTALL \ $(srcdir)/ChangeLog \ + $(srcdir)/gtk-doc.make \ $(NULL) diff --git a/Makefile.in b/Makefile.in index 61de622..badd4c0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -371,6 +371,7 @@ EXTRA_DIST = \ autogen.sh \ harfbuzz.doap \ Android.mk \ + README.python \ $(NULL) MAINTAINERCLEANFILES = \ @@ -379,6 +380,7 @@ MAINTAINERCLEANFILES = \ $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \ $(srcdir)/INSTALL \ $(srcdir)/ChangeLog \ + $(srcdir)/gtk-doc.make \ $(NULL) diff --git a/NEWS b/NEWS index adc8f69..c4950e2 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,64 @@ +Overview of changes leading to 0.9.40 +Friday, March 20, 2015 +===================================== + +- Another hb-coretext crasher fix. Ouch! +- Happy Norouz! + + +Overview of changes leading to 0.9.39 +Wednesday, March 4, 2015 +===================================== + +- Critical hb-coretext fixes. +- Optimizations and refactoring; no functional change + expected. +- Misc build fixes. + + +Overview of changes leading to 0.9.38 +Friday, January 23, 2015 +===================================== + +- Fix minor out-of-bounds access in Indic shaper. +- Change New Tai Lue shaping engine from South-East Asian to default, + reflecting change in Unicode encoding model. +- Add hb-shape --font-size. Can take up to two numbers for separate + x / y size. +- Fix CoreText and FreeType scale issues with negative scales. +- Reject blobs larger than 2GB. This might break some icu-le-hb clients + that need security fixes. See: + http://www.icu-project.org/trac/ticket/11450 +- Avoid accessing font tables during face destruction, in casce rogue + clients released face data already. +- Fix up gobject-introspection a bit. Python bindings kinda working. + See README.python. +- Misc fixes. +- API additions: + hb_ft_face_create_referenced() + hb_ft_font_create_referenced() + + +Overview of changes leading to 0.9.37 +Wednesday, December 17, 2014 +===================================== + +- Fix out-of-bounds access in Context lookup format 3. +- Indic: Allow ZWJ/ZWNJ before syllable modifiers. + + +Overview of changes leading to 0.9.36 +Thursday, November 20, 2014 +===================================== + +- First time that three months went by without a release since + 0.9.2 was released on August 10, 2012! +- Fix performance bug in hb_ot_collect_glyphs(): + https://bugzilla.mozilla.org/show_bug.cgi?id=1090869 +- Add basic vertical-text support to hb-ot-font. +- Misc build fixes. + + Overview of changes leading to 0.9.35 Saturday, August 13, 2014 ===================================== diff --git a/README b/README index 74e739d..d34bc74 100644 --- a/README +++ b/README @@ -1,3 +1,6 @@ +[![Build Status](https://travis-ci.org/behdad/harfbuzz.svg)](https://travis-ci.org/behdad/harfbuzz) +[![Coverage Status](https://img.shields.io/coveralls/behdad/harfbuzz.svg)](https://coveralls.io/r/behdad/harfbuzz) + This is HarfBuzz, a text shaping library. For bug reports, mailing list, and other information please visit: diff --git a/README.python b/README.python new file mode 100644 index 0000000..eabdf5b --- /dev/null +++ b/README.python @@ -0,0 +1,26 @@ +To enable HarfBuzz bindings for Python among other languages, make sure +you have latest version of gobject-introspection compiled, and then +run autogen.sh (if building from git), and then: + + ./configure --with-gobject --enable-introspection + +Make sure that gobject-introspection is enabled then in the final report. + +Compile and install. + +Make sure you have the installation lib dir in LD_LIBRARY_PATH, as needed +for the linker to find the library. + +Then make sure you also have GI_TYPELIB_PATH pointing to the resulting +$prefix/lib/girepository-* directory. + +Make sure you have pygobject installed. Then check that the following +import works in your Python interpretter: + + from gi.repository import HarfBuzz + +If it does, you are ready to call HarfBuzz from Python! Congratulations. +See src/sample.py. + +The Python API will change. Let us know on the mailing list if you are +using it, and send lots of feedback. diff --git a/autogen.sh b/autogen.sh index a267f29..ff1b0c0 100755 --- a/autogen.sh +++ b/autogen.sh @@ -19,17 +19,22 @@ which pkg-config || { exit 1 } +echo -n "checking for libtoolize... " +which glibtoolize || which libtoolize || { + echo "*** No libtoolize (libtool) found, please install it ***" + exit 1 +} echo -n "checking for gtkdocize... " if which gtkdocize ; then gtkdocize --copy || exit 1 else - echo "*** No gtkdocize found, skipping documentation ***" + echo "*** No gtkdocize (gtk-doc) found, skipping documentation ***" echo "EXTRA_DIST = " > gtk-doc.make fi echo -n "checking for autoreconf... " which autoreconf || { - echo "*** No autoreconf found, please install it ***" + echo "*** No autoreconf (autoconf) found, please install it ***" exit 1 } diff --git a/config.h.in b/config.h.in index 491e7f4..35395c3 100644 --- a/config.h.in +++ b/config.h.in @@ -24,9 +24,6 @@ /* Have FreeType 2 library */ #undef HAVE_FREETYPE -/* Define to 1 if you have the `FT_Face_GetCharVariantIndex' function. */ -#undef HAVE_FT_FACE_GETCHARVARIANTINDEX - /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE diff --git a/configure b/configure index 84e04c7..1c08cae 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HarfBuzz 0.9.35. +# Generated by GNU Autoconf 2.69 for HarfBuzz 0.9.40. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HarfBuzz' PACKAGE_TARNAME='harfbuzz' -PACKAGE_VERSION='0.9.35' -PACKAGE_STRING='HarfBuzz 0.9.35' +PACKAGE_VERSION='0.9.40' +PACKAGE_STRING='HarfBuzz 0.9.40' PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz' PACKAGE_URL='http://harfbuzz.org/' @@ -1445,7 +1445,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HarfBuzz 0.9.35 to adapt to many kinds of systems. +\`configure' configures HarfBuzz 0.9.40 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1515,7 +1515,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HarfBuzz 0.9.35:";; + short | recursive ) echo "Configuration of HarfBuzz 0.9.40:";; esac cat <<\_ACEOF @@ -1674,7 +1674,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HarfBuzz configure 0.9.35 +HarfBuzz configure 0.9.40 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2401,7 +2401,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HarfBuzz $as_me 0.9.35, which was +It was created by HarfBuzz $as_me 0.9.40, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3270,7 +3270,7 @@ fi # Define the identity of the package. PACKAGE='harfbuzz' - VERSION='0.9.35' + VERSION='0.9.40' # Some tools Automake needs. @@ -16813,8 +16813,8 @@ GIT=${GIT-"${am_missing_run}git"} HB_VERSION_MAJOR=0 HB_VERSION_MINOR=9 -HB_VERSION_MICRO=35 -HB_VERSION=0.9.35 +HB_VERSION_MICRO=40 +HB_VERSION=0.9.40 @@ -16825,7 +16825,7 @@ HB_VERSION=0.9.35 -HB_LIBTOOL_VERSION_INFO=935:0:935 +HB_LIBTOOL_VERSION_INFO=940:0:940 # Documentation @@ -18618,6 +18618,7 @@ fi have_freetype=false if test "x$with_freetype" = "xyes" -o "x$with_freetype" = "xauto"; then + # See freetype/docs/VERSION.DLL; 12.0.6 means freetype-2.4.2 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5 @@ -18628,12 +18629,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.3.8\""; } >&5 - ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.3.8") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 12.0.6\""; } >&5 + ($PKG_CONFIG --exists --print-errors "freetype2 >= 12.0.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.3.8" 2>/dev/null` + pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 12.0.6" 2>/dev/null` else pkg_failed=yes fi @@ -18646,12 +18647,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.3.8\""; } >&5 - ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.3.8") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 12.0.6\""; } >&5 + ($PKG_CONFIG --exists --print-errors "freetype2 >= 12.0.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.3.8" 2>/dev/null` + pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 12.0.6" 2>/dev/null` else pkg_failed=yes fi @@ -18670,9 +18671,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 >= 2.3.8"` + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 >= 12.0.6"` else - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 2.3.8"` + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 12.0.6"` fi # Put the nasty error message in config.log where it belongs echo "$FREETYPE_PKG_ERRORS" >&5 @@ -18697,23 +18698,6 @@ if $have_freetype; then $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h - _save_libs="$LIBS" - _save_cflags="$CFLAGS" - LIBS="$LIBS $FREETYPE_LIBS" - CFLAGS="$CFLAGS $FREETYPE_CFLAGS" - for ac_func in FT_Face_GetCharVariantIndex -do : - ac_fn_c_check_func "$LINENO" "FT_Face_GetCharVariantIndex" "ac_cv_func_FT_Face_GetCharVariantIndex" -if test "x$ac_cv_func_FT_Face_GetCharVariantIndex" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FT_FACE_GETCHARVARIANTINDEX 1 -_ACEOF - -fi -done - - LIBS="$_save_libs" - CFLAGS="$_save_cflags" fi if $have_freetype; then HAVE_FREETYPE_TRUE= @@ -19622,7 +19606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HarfBuzz $as_me 0.9.35, which was +This file was extended by HarfBuzz $as_me 0.9.40, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19689,7 +19673,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HarfBuzz config.status 0.9.35 +HarfBuzz config.status 0.9.40 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index b9e82d9..5baad1f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([HarfBuzz], - [0.9.35], + [0.9.40], [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz], [harfbuzz], [http://harfbuzz.org/]) @@ -285,7 +285,7 @@ if test "x$with_graphite2" = "xyes" -a "x$have_graphite2" != "xtrue"; then AC_MSG_ERROR([graphite2 support requested but libgraphite2 not found]) fi if $have_graphite2; then - AC_DEFINE(HAVE_GRAPHITE2, 1, [Have Graphite2 library]) + AC_DEFINE(HAVE_GRAPHITE2, 1, [Have Graphite2 library]) fi AM_CONDITIONAL(HAVE_GRAPHITE2, $have_graphite2) @@ -297,20 +297,14 @@ AC_ARG_WITH(freetype, [with_freetype=auto]) have_freetype=false if test "x$with_freetype" = "xyes" -o "x$with_freetype" = "xauto"; then - PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.3.8, have_freetype=true, :) + # See freetype/docs/VERSION.DLL; 12.0.6 means freetype-2.4.2 + PKG_CHECK_MODULES(FREETYPE, freetype2 >= 12.0.6, have_freetype=true, :) fi if test "x$with_freetype" = "xyes" -a "x$have_freetype" != "xtrue"; then AC_MSG_ERROR([FreeType support requested but libfreetype2 not found]) fi if $have_freetype; then AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library]) - _save_libs="$LIBS" - _save_cflags="$CFLAGS" - LIBS="$LIBS $FREETYPE_LIBS" - CFLAGS="$CFLAGS $FREETYPE_CFLAGS" - AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex) - LIBS="$_save_libs" - CFLAGS="$_save_cflags" fi AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) diff --git a/docs/Makefile.am b/docs/Makefile.am index f3ddc22..034926c 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1 +1,3 @@ SUBDIRS = reference + +-include $(top_srcdir)/git.mk diff --git a/docs/Makefile.in b/docs/Makefile.in index 615c464..f8fe860 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -650,6 +650,8 @@ uninstall-am: ps ps-am tags tags-am uninstall uninstall-am +-include $(top_srcdir)/git.mk + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/docs/reference/html/annotation-glossary.html b/docs/reference/html/annotation-glossary.html index a78200e..1afb91d 100644 --- a/docs/reference/html/annotation-glossary.html +++ b/docs/reference/html/annotation-glossary.html @@ -18,6 +18,8 @@  |  D  |  + E +  |  I  |  O @@ -35,9 +37,6 @@ Annotation Glossary

A

-allow-none
-

NULL is ok, both for passing and for returning.

-
array

Parameter points to an array of items.

C

@@ -48,6 +47,10 @@
destroy

This parameter is a 'destroy_data', for callbacks.

+

E

+
+element-type
+

Generics and defining elements of containers and arrays.

I

inout
diff --git a/docs/reference/html/ch01.html b/docs/reference/html/ch01.html index 58329ec..a86abae 100644 --- a/docs/reference/html/ch01.html +++ b/docs/reference/html/ch01.html @@ -21,7 +21,7 @@

-[Insert title here]

+[Insert title here]
hb diff --git a/docs/reference/html/harfbuzz-hb-blob.html b/docs/reference/html/harfbuzz-hb-blob.html index 00f828d..b7f9a12 100644 --- a/docs/reference/html/harfbuzz-hb-blob.html +++ b/docs/reference/html/harfbuzz-hb-blob.html @@ -179,12 +179,60 @@ hb_blob_create (const char hb_memory_mode_t mode, void *user_data, hb_destroy_func_t destroy); -

-

+

Creates a new "blob" object wrapping data +. The mode + parameter is used +to negotiate ownership and lifecycle of data +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

data

Pointer to blob data.

 

length

Length of data +in bytes.

 

mode

Memory mode for data +.

 

user_data

Data parameter to pass to destroy +.

 

destroy

Callback to call when data +is not needed anymore.

 
+
-

Returns

+

Returns

+

New blob, or the empty blob if something failed or if length +is +zero. Destroy with hb_blob_destroy().

+

Since 1.0


@@ -202,7 +250,7 @@ is.

Makes parent immutable.

-

Parameters

+

Parameters

@@ -230,7 +278,7 @@ is.

-

Returns

+

Returns

New blob, or the empty blob if something failed or if length is zero or offset @@ -253,7 +301,7 @@ hb_blob_destroy ( -

Parameters

+

Parameters

@@ -276,7 +324,7 @@ was created for if it has not been called already.

hb_blob_get_data (hb_blob_t *blob, unsigned int *length);
-

Parameters

+

Parameters

@@ -298,7 +346,7 @@ hb_blob_get_data ( -

Returns

+

Returns

.

[transfer none][array length=length]

@@ -315,7 +363,7 @@ return pointer to data.

Fails if blob has been made immutable, or if memory allocation fails.

-

Parameters

+

Parameters

@@ -337,7 +385,7 @@ fails.

-

Returns

+

Returns

Writable blob data, or NULL if failed.

[transfer none][array length=length]

@@ -352,7 +400,7 @@ hb_blob_get_empty (voidReturns the singleton empty blob.

See TODO:link object types for more information.

-

Returns

+

Returns

the empty blob.

[transfer full]

@@ -364,7 +412,7 @@ hb_blob_get_empty (voidunsigned int hb_blob_get_length (hb_blob_t *blob);
-

Parameters

+

Parameters

@@ -379,7 +427,7 @@ hb_blob_get_length ( -

Returns

+

Returns

the length of blob data in bytes.

@@ -392,7 +440,7 @@ hb_blob_get_length (hb_blob_t *blob, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -414,7 +462,7 @@ hb_blob_get_user_data ( -

Returns

+

Returns

.

[transfer none]

@@ -426,7 +474,7 @@ hb_blob_get_user_data (hb_bool_t hb_blob_is_immutable (hb_blob_t *blob);
-

Parameters

+

Parameters

@@ -441,7 +489,7 @@ hb_blob_is_immutable ( -

Returns

+

Returns

TODO

@@ -453,7 +501,7 @@ hb_blob_is_immutable (void hb_blob_make_immutable (hb_blob_t *blob);
-

Parameters

+

Parameters

@@ -478,7 +526,7 @@ hb_blob_reference ( -

Parameters

+

Parameters

@@ -493,7 +541,7 @@ hb_blob_reference ( -

Returns

+

Returns

blob .

@@ -510,7 +558,7 @@ hb_blob_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -548,7 +596,7 @@ is not needed anymore.

-

Returns

+

Returns

Since 1.0

@@ -569,7 +617,7 @@ is not needed anymore.

-

Members

+

Members

diff --git a/docs/reference/html/harfbuzz-hb-buffer.html b/docs/reference/html/harfbuzz-hb-buffer.html index a4214dd..0c32fc8 100644 --- a/docs/reference/html/harfbuzz-hb-buffer.html +++ b/docs/reference/html/harfbuzz-hb-buffer.html @@ -482,7 +482,7 @@ hb_buffer_add (hb_codepoint_t codepoint, unsigned int cluster);
-

Parameters

+

Parameters

@@ -508,7 +508,7 @@ hb_buffer_add_utf16 (unsigned int item_offset, int item_length);
-

Parameters

+

Parameters

@@ -541,7 +541,7 @@ hb_buffer_add_utf32 (unsigned int item_offset, int item_length);
-

Parameters

+

Parameters

@@ -574,7 +574,7 @@ hb_buffer_add_utf8 (unsigned int item_offset, int item_length);
-

Parameters

+

Parameters

@@ -590,7 +590,7 @@ hb_buffer_add_utf8 (

text

- +

.

[array length=text_length][array length=text_length][element-type uint8_t]
@@ -614,7 +614,7 @@ hb_buffer_add_codepoints (hb_bool_t hb_buffer_allocation_successful (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -629,7 +629,7 @@ hb_buffer_allocation_successful (
-

Returns

+

Returns

Since 1.0

@@ -640,7 +640,7 @@ hb_buffer_allocation_successful (void hb_buffer_clear_contents (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -664,7 +664,7 @@ hb_buffer_create (void

-

Returns

+

Returns

@@ -679,7 +679,7 @@ hb_buffer_deserialize_glyphs (hb_font_t *font, hb_buffer_serialize_format_t format);
-

Parameters

+

Parameters

@@ -706,7 +706,7 @@ hb_buffer_deserialize_glyphs ( -

Returns

+

Returns

Since 1.0

@@ -717,7 +717,7 @@ hb_buffer_deserialize_glyphs (void hb_buffer_destroy (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -739,7 +739,7 @@ hb_buffer_destroy (hb_buffer_content_type_t hb_buffer_get_content_type (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -754,7 +754,7 @@ hb_buffer_get_content_type ( -

Returns

+

Returns

Since 1.0

@@ -765,7 +765,7 @@ hb_buffer_get_content_type (hb_direction_t hb_buffer_get_direction (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -780,7 +780,7 @@ hb_buffer_get_direction ( -

Returns

+

Returns

Since 1.0

@@ -791,7 +791,7 @@ hb_buffer_get_direction (hb_buffer_t * hb_buffer_get_empty (void);
-

Returns

+

Returns

.

[transfer full]

@@ -803,7 +803,7 @@ hb_buffer_get_empty (void<
hb_buffer_flags_t
 hb_buffer_get_flags (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -818,7 +818,7 @@ hb_buffer_get_flags ( -

Returns

+

Returns

Since 1.0

@@ -832,7 +832,7 @@ hb_buffer_get_glyph_infos ( -

Parameters

+

Parameters

@@ -854,7 +854,7 @@ is valid as long as buffer contents are not modified.

-

Returns

+

Returns

buffer glyph information array.

[transfer none][array length=length]

@@ -869,7 +869,7 @@ hb_buffer_get_glyph_positions (Returns buffer glyph position array. Returned pointer is valid as long as buffer contents are not modified.

-

Parameters

+

Parameters

@@ -891,7 +891,7 @@ is valid as long as buffer contents are not modified.

-

Returns

+

Returns

buffer glyph position array.

[transfer none][array length=length]

@@ -903,7 +903,7 @@ is valid as long as buffer contents are not modified.

hb_language_t
 hb_buffer_get_language (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -918,7 +918,7 @@ hb_buffer_get_language ( -

Returns

+

Returns

Since 1.0

@@ -930,7 +930,7 @@ hb_buffer_get_language (hb_buffer_t *buffer);

Returns the number of items in the buffer.

-

Parameters

+

Parameters

@@ -945,7 +945,7 @@ hb_buffer_get_length ( -

Returns

+

Returns

buffer length.

@@ -964,7 +964,7 @@ hb_buffer_get_replacement_codepoint (hb_script_t hb_buffer_get_script (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -979,7 +979,7 @@ hb_buffer_get_script ( -

Returns

+

Returns

Since 1.0

@@ -991,7 +991,7 @@ hb_buffer_get_script (hb_buffer_t *buffer, hb_segment_properties_t *props);
-

Parameters

+

Parameters

@@ -1013,7 +1013,7 @@ hb_buffer_get_segment_properties (hb_unicode_funcs_t * hb_buffer_get_unicode_funcs (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -1028,7 +1028,7 @@ hb_buffer_get_unicode_funcs ( -

Returns

+

Returns

Since 1.0

@@ -1040,7 +1040,7 @@ hb_buffer_get_unicode_funcs (hb_buffer_t *buffer, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -1055,7 +1055,7 @@ hb_buffer_get_user_data ( -

Returns

+

Returns

Since 1.0

@@ -1080,7 +1080,7 @@ it will be set to the process's default language as returned by hb_language_get_default(). This may change in the future by taking buffer script into consideration when choosing a language.

-

Parameters

+

Parameters

@@ -1102,7 +1102,7 @@ taking buffer script into consideration when choosing a language.

void
 hb_buffer_normalize_glyphs (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -1125,7 +1125,7 @@ hb_buffer_normalize_glyphs (hb_buffer_t *buffer, unsigned int size);
-

Parameters

+

Parameters

@@ -1140,7 +1140,7 @@ hb_buffer_pre_allocate ( -

Returns

+

Returns

Since 1.0

@@ -1151,7 +1151,7 @@ hb_buffer_pre_allocate (hb_buffer_t * hb_buffer_reference (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -1166,7 +1166,7 @@ hb_buffer_reference ( -

Returns

+

Returns

.

[transfer full]

@@ -1178,7 +1178,7 @@ hb_buffer_reference (void hb_buffer_reset (hb_buffer_t *buffer);
-

Parameters

+

Parameters

@@ -1201,7 +1201,7 @@ hb_buffer_reset (hb_buffer_t *buffer);

Reverses buffer contents.

-

Parameters

+

Parameters

@@ -1226,7 +1226,7 @@ hb_buffer_reverse_clusters ( -

Parameters

+

Parameters

@@ -1250,7 +1250,7 @@ hb_buffer_serialize_format_from_string (const char *str, int len);
-

Returns

+

Returns

Since 1.0

@@ -1261,7 +1261,7 @@ hb_buffer_serialize_format_from_string
const char *
 hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format);
-

Returns

+

Returns

Since 1.0

@@ -1280,7 +1280,7 @@ hb_buffer_serialize_glyphs (hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags);
-

Parameters

+

Parameters

@@ -1307,7 +1307,7 @@ hb_buffer_serialize_glyphs ( -

Returns

+

Returns

Since 1.0

@@ -1318,7 +1318,7 @@ hb_buffer_serialize_glyphs (const char ** hb_buffer_serialize_list_formats (void);
-

Returns

+

Returns

.

[transfer none]

@@ -1331,7 +1331,7 @@ hb_buffer_serialize_list_formats (hb_buffer_t *buffer, hb_buffer_content_type_t content_type);
-

Parameters

+

Parameters

@@ -1354,7 +1354,7 @@ hb_buffer_set_content_type (hb_buffer_t *buffer, hb_direction_t direction);
-

Parameters

+

Parameters

@@ -1377,7 +1377,7 @@ hb_buffer_set_direction (hb_buffer_t *buffer, hb_buffer_flags_t flags);
-

Parameters

+

Parameters

@@ -1400,7 +1400,7 @@ hb_buffer_set_flags (hb_buffer_t *buffer, hb_language_t language);
-

Parameters

+

Parameters

@@ -1423,7 +1423,7 @@ hb_buffer_set_language (hb_buffer_t *buffer, unsigned int length);
-

Parameters

+

Parameters

@@ -1438,7 +1438,7 @@ hb_buffer_set_length ( -

Returns

+

Returns

Since 1.0

@@ -1458,7 +1458,7 @@ hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, hb_script_t script);
-

Parameters

+

Parameters

@@ -1481,7 +1481,7 @@ hb_buffer_set_script (hb_buffer_t *buffer, const hb_segment_properties_t *props);
-

Parameters

+

Parameters

@@ -1504,7 +1504,7 @@ hb_buffer_set_segment_properties (hb_buffer_t *buffer, hb_unicode_funcs_t *unicode_funcs);
-

Parameters

+

Parameters

@@ -1530,7 +1530,7 @@ hb_buffer_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -1545,7 +1545,7 @@ hb_buffer_set_user_data ( -

Returns

+

Returns

Since 1.0

@@ -1559,7 +1559,7 @@ hb_segment_properties_equal (const

-

Returns

+

Returns

@@ -1571,7 +1571,7 @@ hb_segment_properties_hash (const

-

Returns

+

Returns

@@ -1590,7 +1590,7 @@ hb_segment_properties_hash (const

-

Members

+

Members

@@ -1623,7 +1623,7 @@ hb_segment_properties_hash (const

-

Members

+

Members

@@ -1661,7 +1661,7 @@ hb_segment_properties_hash (const

-

Members

+

Members

@@ -1699,7 +1699,7 @@ hb_segment_properties_hash (const

-

Members

+

Members

diff --git a/docs/reference/html/harfbuzz-hb-common.html b/docs/reference/html/harfbuzz-hb-common.html index 47aedb6..e2b1a8b 100644 --- a/docs/reference/html/harfbuzz-hb-common.html +++ b/docs/reference/html/harfbuzz-hb-common.html @@ -311,7 +311,7 @@ hb_direction_from_string (const char *str, int len);
-

Parameters

+

Parameters

@@ -326,7 +326,7 @@ hb_direction_from_string (const c
-

Returns

+

Returns

Since 1.0

@@ -337,7 +337,7 @@ hb_direction_from_string (const c
const char *
 hb_direction_to_string (hb_direction_t direction);
-

Returns

+

Returns

.

[transfer none]

@@ -350,7 +350,7 @@ hb_direction_to_string (const char *str, int len);
-

Parameters

+

Parameters

@@ -365,7 +365,7 @@ hb_language_from_string (const ch
-

Returns

+

Returns

Since 1.0

@@ -376,7 +376,7 @@ hb_language_from_string (const ch
hb_language_t
 hb_language_get_default (void);
-

Returns

+

Returns

Since 1.0

@@ -387,7 +387,7 @@ hb_language_get_default (voidconst char * hb_language_to_string (hb_language_t language);
-

Returns

+

Returns

.

[transfer none]

@@ -399,7 +399,7 @@ hb_language_to_string (hb_script_t hb_script_from_iso15924_tag (hb_tag_t tag);
-

Returns

+

Returns

Since 1.0

@@ -411,7 +411,7 @@ hb_script_from_iso15924_tag (const char *s, int len);
-

Parameters

+

Parameters

@@ -426,7 +426,7 @@ hb_script_from_string (const char
-

Returns

+

Returns

Since 1.0

@@ -437,7 +437,7 @@ hb_script_from_string (const char
hb_direction_t
 hb_script_get_horizontal_direction (hb_script_t script);
-

Returns

+

Returns

Since 1.0

@@ -448,7 +448,7 @@ hb_script_get_horizontal_direction (hb_tag_t hb_script_to_iso15924_tag (hb_script_t script);
-

Returns

+

Returns

Since 1.0

@@ -460,7 +460,7 @@ hb_script_to_iso15924_tag (const char *str, int len);
-

Parameters

+

Parameters

@@ -475,7 +475,7 @@ hb_tag_from_string (const char
-

Returns

+

Returns

Since 1.0

@@ -487,7 +487,7 @@ hb_tag_from_string (const charhb_tag_t tag, char *buf);
-

Parameters

+

Parameters

@@ -581,7 +581,7 @@ hb_tag_to_string ( -

Members

+

Members

@@ -648,7 +648,7 @@ hb_tag_to_string ( -

Members

+

Members

diff --git a/docs/reference/html/harfbuzz-hb-coretext.html b/docs/reference/html/harfbuzz-hb-coretext.html index 939d711..8d3ab15 100644 --- a/docs/reference/html/harfbuzz-hb-coretext.html +++ b/docs/reference/html/harfbuzz-hb-coretext.html @@ -105,7 +105,7 @@ hb_coretext_face_get_cg_font ( -

Returns

+

Returns

@@ -117,7 +117,7 @@ hb_coretext_font_get_ct_font ( -

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-face.html b/docs/reference/html/harfbuzz-hb-face.html index 4a2f856..dc31c55 100644 --- a/docs/reference/html/harfbuzz-hb-face.html +++ b/docs/reference/html/harfbuzz-hb-face.html @@ -210,7 +210,7 @@ hb_face_create ( -

Returns

+

Returns

@@ -222,7 +222,7 @@ hb_face_create_for_tables (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -237,7 +237,7 @@ hb_face_create_for_tables ( -

Returns

+

Returns

(transfer full)

@@ -249,7 +249,7 @@ hb_face_create_for_tables (void hb_face_destroy (hb_face_t *face);
-

Parameters

+

Parameters

@@ -271,7 +271,7 @@ hb_face_destroy (hb_face_t * hb_face_get_empty (void);
-

Returns

+

Returns

(transfer full)

@@ -283,7 +283,7 @@ hb_face_get_empty (voidunsigned int hb_face_get_glyph_count (hb_face_t *face);
-

Parameters

+

Parameters

@@ -298,7 +298,7 @@ hb_face_get_glyph_count ( -

Returns

+

Returns

Since 1.0

@@ -309,7 +309,7 @@ hb_face_get_glyph_count (unsigned int hb_face_get_index (hb_face_t *face);
-

Parameters

+

Parameters

@@ -324,7 +324,7 @@ hb_face_get_index ( -

Returns

+

Returns

Since 1.0

@@ -335,7 +335,7 @@ hb_face_get_index (unsigned int hb_face_get_upem (hb_face_t *face);
-

Parameters

+

Parameters

@@ -350,7 +350,7 @@ hb_face_get_upem ( -

Returns

+

Returns

Since 1.0

@@ -362,7 +362,7 @@ hb_face_get_upem (hb_face_t *face, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -377,7 +377,7 @@ hb_face_get_user_data ( -

Returns

+

Returns

.

[transfer none]

@@ -389,7 +389,7 @@ hb_face_get_user_data (hb_bool_t hb_face_is_immutable (hb_face_t *face);
-

Parameters

+

Parameters

@@ -404,7 +404,7 @@ hb_face_is_immutable ( -

Returns

+

Returns

Since 1.0

@@ -415,7 +415,7 @@ hb_face_is_immutable (void hb_face_make_immutable (hb_face_t *face);
-

Parameters

+

Parameters

@@ -437,7 +437,7 @@ hb_face_make_immutable (hb_face_t * hb_face_reference (hb_face_t *face);
-

Parameters

+

Parameters

@@ -452,7 +452,7 @@ hb_face_reference ( -

Returns

+

Returns

Since 1.0

@@ -463,7 +463,7 @@ hb_face_reference (hb_blob_t * hb_face_reference_blob (hb_face_t *face);
-

Parameters

+

Parameters

@@ -478,7 +478,7 @@ hb_face_reference_blob ( -

Returns

+

Returns

.

[transfer full]

@@ -491,7 +491,7 @@ hb_face_reference_blob (hb_face_t *face, hb_tag_t tag);
-

Parameters

+

Parameters

@@ -506,7 +506,7 @@ hb_face_reference_table ( -

Returns

+

Returns

.

[transfer full]

@@ -519,7 +519,7 @@ hb_face_reference_table (hb_face_t *face, unsigned int glyph_count);
-

Parameters

+

Parameters

@@ -542,7 +542,7 @@ hb_face_set_glyph_count (hb_face_t *face, unsigned int index);
-

Parameters

+

Parameters

@@ -565,7 +565,7 @@ hb_face_set_index (hb_face_t *face, unsigned int upem);
-

Parameters

+

Parameters

@@ -591,7 +591,7 @@ hb_face_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -606,7 +606,7 @@ hb_face_set_user_data ( -

Returns

+

Returns

Since 1.0

diff --git a/docs/reference/html/harfbuzz-hb-font.html b/docs/reference/html/harfbuzz-hb-font.html index 2f91181..9596d54 100644 --- a/docs/reference/html/harfbuzz-hb-font.html +++ b/docs/reference/html/harfbuzz-hb-font.html @@ -630,7 +630,7 @@ hb_font_add_glyph_origin_for_direction hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -666,7 +666,7 @@ hb_font_create ( -

Returns

+

Returns

@@ -676,7 +676,7 @@ hb_font_create (hb_font_t * hb_font_create_sub_font (hb_font_t *parent);
-

Parameters

+

Parameters

@@ -691,7 +691,7 @@ hb_font_create_sub_font ( -

Returns

+

Returns

.

[transfer full]

@@ -703,7 +703,7 @@ hb_font_create_sub_font (void hb_font_destroy (hb_font_t *font);
-

Parameters

+

Parameters

@@ -727,7 +727,7 @@ hb_font_funcs_create (void

-

Returns

+

Returns

@@ -737,7 +737,7 @@ hb_font_funcs_create (void
void
 hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
-

Parameters

+

Parameters

@@ -759,7 +759,7 @@ hb_font_funcs_destroy (hb_font_funcs_t * hb_font_funcs_get_empty (void);
-

Returns

+

Returns

.

[transfer full]

@@ -772,7 +772,7 @@ hb_font_funcs_get_empty (voidhb_font_funcs_t *ffuncs, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -787,7 +787,7 @@ hb_font_funcs_get_user_data ( -

Returns

+

Returns

.

[transfer none]

@@ -799,7 +799,7 @@ hb_font_funcs_get_user_data (hb_bool_t hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
-

Parameters

+

Parameters

@@ -814,7 +814,7 @@ hb_font_funcs_is_immutable ( -

Returns

+

Returns

Since 1.0

@@ -825,7 +825,7 @@ hb_font_funcs_is_immutable (void hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
-

Parameters

+

Parameters

@@ -847,7 +847,7 @@ hb_font_funcs_make_immutable (hb_font_funcs_t * hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
-

Parameters

+

Parameters

@@ -862,7 +862,7 @@ hb_font_funcs_reference ( -

Returns

+

Returns

Since 1.0

@@ -877,7 +877,7 @@ hb_font_funcs_set_glyph_contour_point_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -909,7 +909,7 @@ hb_font_funcs_set_glyph_extents_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -942,7 +942,7 @@ hb_font_funcs_set_glyph_from_name_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -967,7 +967,7 @@ hb_font_funcs_set_glyph_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -993,7 +993,7 @@ hb_font_funcs_set_glyph_h_advance_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -1026,7 +1026,7 @@ hb_font_funcs_set_glyph_h_kerning_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -1058,7 +1058,7 @@ hb_font_funcs_set_glyph_h_origin_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -1090,7 +1090,7 @@ hb_font_funcs_set_glyph_name_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -1116,7 +1116,7 @@ hb_font_funcs_set_glyph_v_advance_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -1149,7 +1149,7 @@ hb_font_funcs_set_glyph_v_kerning_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -1181,7 +1181,7 @@ hb_font_funcs_set_glyph_v_origin_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -1214,7 +1214,7 @@ hb_font_funcs_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -1229,7 +1229,7 @@ hb_font_funcs_set_user_data ( -

Returns

+

Returns

Since 1.0

@@ -1240,7 +1240,7 @@ hb_font_funcs_set_user_data (hb_font_t * hb_font_get_empty (void);
-

Returns

+

Returns

(transfer full)

@@ -1252,7 +1252,7 @@ hb_font_get_empty (voidhb_face_t * hb_font_get_face (hb_font_t *font);
-

Parameters

+

Parameters

@@ -1267,7 +1267,7 @@ hb_font_get_face ( -

Returns

+

Returns

.

[transfer none]

@@ -1282,7 +1282,7 @@ hb_font_get_glyph (hb_codepoint_t variation_selector, hb_codepoint_t *glyph);
-

Parameters

+

Parameters

@@ -1304,7 +1304,7 @@ hb_font_get_glyph ( -

Returns

+

Returns

Since 1.0

@@ -1320,7 +1320,7 @@ hb_font_get_glyph_advance_for_direction hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -1359,7 +1359,7 @@ hb_font_get_glyph_advance_for_direction

-

Returns

+

Returns

@@ -1373,7 +1373,7 @@ hb_font_get_glyph_contour_point (hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -1400,7 +1400,7 @@ hb_font_get_glyph_contour_point (
-

Returns

+

Returns

Since 1.0

@@ -1417,7 +1417,7 @@ hb_font_get_glyph_contour_point_for_origin hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -1444,7 +1444,7 @@ hb_font_get_glyph_contour_point_for_origin
-

Returns

+

Returns

Since 1.0

@@ -1464,7 +1464,7 @@ hb_font_get_glyph_contour_point_for_origin

-

Returns

+

Returns

@@ -1476,7 +1476,7 @@ hb_font_get_glyph_extents (hb_codepoint_t glyph, hb_glyph_extents_t *extents);
-

Parameters

+

Parameters

@@ -1498,7 +1498,7 @@ hb_font_get_glyph_extents ( -

Returns

+

Returns

Since 1.0

@@ -1512,7 +1512,7 @@ hb_font_get_glyph_extents_for_origin (hb_direction_t direction, hb_glyph_extents_t *extents);
-

Parameters

+

Parameters

@@ -1534,7 +1534,7 @@ hb_font_get_glyph_extents_for_origin ( -

Returns

+

Returns

Since 1.0

@@ -1551,7 +1551,7 @@ hb_font_get_glyph_extents_for_origin ( -

Returns

+

Returns

@@ -1564,7 +1564,7 @@ hb_font_get_glyph_from_name (int len, hb_codepoint_t *glyph);
-

Parameters

+

Parameters

@@ -1591,7 +1591,7 @@ hb_font_get_glyph_from_name ( -

Returns

+

Returns

Since 1.0

@@ -1607,7 +1607,7 @@ hb_font_get_glyph_from_name ( -

Returns

+

Returns

@@ -1624,7 +1624,7 @@ hb_font_get_glyph_from_name ( -

Returns

+

Returns

@@ -1635,7 +1635,7 @@ hb_font_get_glyph_from_name (hb_font_t *font, hb_codepoint_t glyph);
-

Parameters

+

Parameters

@@ -1650,7 +1650,7 @@ hb_font_get_glyph_h_advance ( -

Returns

+

Returns

Since 1.0

@@ -1663,7 +1663,7 @@ hb_font_get_glyph_h_kerning (hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
-

Parameters

+

Parameters

@@ -1678,7 +1678,7 @@ hb_font_get_glyph_h_kerning ( -

Returns

+

Returns

Since 1.0

@@ -1692,7 +1692,7 @@ hb_font_get_glyph_h_origin (hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -1719,7 +1719,7 @@ hb_font_get_glyph_h_origin ( -

Returns

+

Returns

Since 1.0

@@ -1736,7 +1736,7 @@ hb_font_get_glyph_kerning_for_direction hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -1776,7 +1776,7 @@ hb_font_get_glyph_kerning_for_direction

-

Returns

+

Returns

@@ -1789,7 +1789,7 @@ hb_font_get_glyph_name (char *name, unsigned int size);
-

Parameters

+

Parameters

@@ -1811,7 +1811,7 @@ hb_font_get_glyph_name ( -

Returns

+

Returns

Since 1.0

@@ -1829,7 +1829,7 @@ hb_font_get_glyph_name ( -

Returns

+

Returns

@@ -1844,7 +1844,7 @@ hb_font_get_glyph_origin_for_direction hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -1885,7 +1885,7 @@ hb_font_get_glyph_origin_for_direction

-

Returns

+

Returns

@@ -1896,7 +1896,7 @@ hb_font_get_glyph_origin_for_direction hb_font_get_glyph_v_advance (hb_font_t *font, hb_codepoint_t glyph);
-

Parameters

+

Parameters

@@ -1911,7 +1911,7 @@ hb_font_get_glyph_v_advance ( -

Returns

+

Returns

Since 1.0

@@ -1924,7 +1924,7 @@ hb_font_get_glyph_v_kerning (hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);
-

Parameters

+

Parameters

@@ -1939,7 +1939,7 @@ hb_font_get_glyph_v_kerning ( -

Returns

+

Returns

Since 1.0

@@ -1953,7 +1953,7 @@ hb_font_get_glyph_v_origin (hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -1980,7 +1980,7 @@ hb_font_get_glyph_v_origin ( -

Returns

+

Returns

Since 1.0

@@ -1991,7 +1991,7 @@ hb_font_get_glyph_v_origin (hb_font_t * hb_font_get_parent (hb_font_t *font);
-

Parameters

+

Parameters

@@ -2006,7 +2006,7 @@ hb_font_get_parent ( -

Returns

+

Returns

.

[transfer none]

@@ -2020,7 +2020,7 @@ hb_font_get_ppem (unsigned int *x_ppem, unsigned int *y_ppem);
-

Parameters

+

Parameters

@@ -2056,7 +2056,7 @@ hb_font_get_scale (int *x_scale, int *y_scale);
-

Parameters

+

Parameters

@@ -2091,7 +2091,7 @@ hb_font_get_scale (hb_font_t *font, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -2106,7 +2106,7 @@ hb_font_get_user_data ( -

Returns

+

Returns

.

[transfer none]

@@ -2121,7 +2121,7 @@ hb_font_glyph_from_string (int len, hb_codepoint_t *glyph);
-

Parameters

+

Parameters

@@ -2148,7 +2148,7 @@ hb_font_glyph_from_string ( -

Returns

+

Returns

Since 1.0

@@ -2162,7 +2162,7 @@ hb_font_glyph_to_string (char *s, unsigned int size);
-

Parameters

+

Parameters

@@ -2191,7 +2191,7 @@ hb_font_glyph_to_string (hb_bool_t hb_font_is_immutable (hb_font_t *font);
-

Parameters

+

Parameters

@@ -2206,7 +2206,7 @@ hb_font_is_immutable ( -

Returns

+

Returns

Since 1.0

@@ -2217,7 +2217,7 @@ hb_font_is_immutable (void hb_font_make_immutable (hb_font_t *font);
-

Parameters

+

Parameters

@@ -2239,7 +2239,7 @@ hb_font_make_immutable (hb_font_t * hb_font_reference (hb_font_t *font);
-

Parameters

+

Parameters

@@ -2254,7 +2254,7 @@ hb_font_reference ( -

Returns

+

Returns

.

[transfer full]

@@ -2269,7 +2269,7 @@ hb_font_set_funcs (void *font_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -2300,7 +2300,7 @@ hb_font_set_funcs_data (void *font_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -2331,7 +2331,7 @@ hb_font_set_ppem (unsigned int x_ppem, unsigned int y_ppem);
-

Parameters

+

Parameters

@@ -2355,7 +2355,7 @@ hb_font_set_scale (int x_scale, int y_scale);
-

Parameters

+

Parameters

@@ -2381,7 +2381,7 @@ hb_font_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -2396,7 +2396,7 @@ hb_font_set_user_data ( -

Returns

+

Returns

Since 1.0

@@ -2412,7 +2412,7 @@ hb_font_subtract_glyph_origin_for_direction hb_position_t *x, hb_position_t *y);
-

Parameters

+

Parameters

@@ -2450,7 +2450,7 @@ hb_font_subtract_glyph_origin_for_direction

-

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-ft.html b/docs/reference/html/harfbuzz-hb-ft.html index 5194725..910af86 100644 --- a/docs/reference/html/harfbuzz-hb-ft.html +++ b/docs/reference/html/harfbuzz-hb-ft.html @@ -95,7 +95,7 @@ hb_ft_face_create (FT_Face ft_face, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -110,7 +110,7 @@ hb_ft_face_create (FT_Face
-

Returns

+

Returns

.

[transfer full]

@@ -122,7 +122,7 @@ hb_ft_face_create (FT_Face
hb_face_t *
 hb_ft_face_create_cached (FT_Face ft_face);
-

Returns

+

Returns

.

[transfer full]

@@ -135,7 +135,7 @@ hb_ft_face_create_cached (FT_Face hb_ft_font_create (FT_Face ft_face, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -150,7 +150,7 @@ hb_ft_font_create (FT_Face
-

Returns

+

Returns

.

[transfer full]

@@ -164,7 +164,7 @@ hb_ft_font_get_face ( -

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-glib.html b/docs/reference/html/harfbuzz-hb-glib.html index d8ebd68..03ab919 100644 --- a/docs/reference/html/harfbuzz-hb-glib.html +++ b/docs/reference/html/harfbuzz-hb-glib.html @@ -80,7 +80,7 @@ hb_glib_get_unicode_funcs (void

-

Returns

+

Returns

@@ -92,7 +92,7 @@ hb_glib_script_from_script ( -

Returns

+

Returns

@@ -104,7 +104,7 @@ hb_glib_script_to_script (GUnicod

-

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-graphite2.html b/docs/reference/html/harfbuzz-hb-graphite2.html index cc51db9..2c57cac 100644 --- a/docs/reference/html/harfbuzz-hb-graphite2.html +++ b/docs/reference/html/harfbuzz-hb-graphite2.html @@ -85,7 +85,7 @@ hb_graphite2_face_get_gr_face (

-

Returns

+

Returns

@@ -97,7 +97,7 @@ hb_graphite2_font_get_gr_font (

-

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-icu.html b/docs/reference/html/harfbuzz-hb-icu.html index 77c031c..307aeb2 100644 --- a/docs/reference/html/harfbuzz-hb-icu.html +++ b/docs/reference/html/harfbuzz-hb-icu.html @@ -80,7 +80,7 @@ hb_icu_get_unicode_funcs (void

-

Returns

+

Returns

@@ -92,7 +92,7 @@ hb_icu_script_from_script ( -

Returns

+

Returns

@@ -104,7 +104,7 @@ hb_icu_script_to_script (UScriptC

-

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-ot-layout.html b/docs/reference/html/harfbuzz-hb-ot-layout.html index 32a2663..d7231db 100644 --- a/docs/reference/html/harfbuzz-hb-ot-layout.html +++ b/docs/reference/html/harfbuzz-hb-ot-layout.html @@ -319,7 +319,7 @@ hb_ot_layout_feature_get_lookups (

-

Returns

+

Returns

@@ -335,7 +335,7 @@ hb_ot_layout_get_attach_points (

-

Returns

+

Returns

@@ -348,7 +348,7 @@ hb_ot_layout_get_glyph_class ( -

Returns

+

Returns

@@ -375,7 +375,7 @@ hb_ot_layout_get_ligature_carets (

-

Returns

+

Returns

@@ -392,7 +392,7 @@ hb_ot_layout_get_size_params ( -

Returns

+

Returns

@@ -408,7 +408,7 @@ hb_ot_layout_get_size_params ( -

Returns

+

Returns

@@ -420,7 +420,7 @@ hb_ot_layout_has_glyph_classes (

-

Returns

+

Returns

@@ -432,7 +432,7 @@ hb_ot_layout_has_positioning ( -

Returns

+

Returns

@@ -444,7 +444,7 @@ hb_ot_layout_has_substitution (

-

Returns

+

Returns

@@ -461,7 +461,7 @@ hb_ot_layout_language_find_feature (

-

Returns

+

Returns

@@ -480,7 +480,7 @@ hb_ot_layout_language_get_feature_indexes

-

Returns

+

Returns

@@ -499,7 +499,7 @@ hb_ot_layout_language_get_feature_tags

-

Returns

+

Returns

@@ -552,7 +552,7 @@ hb_ot_layout_lookup_would_substitute ( -

Returns

+

Returns

@@ -568,7 +568,7 @@ hb_ot_layout_script_find_language (

-

Returns

+

Returns

@@ -585,7 +585,7 @@ hb_ot_layout_script_get_language_tags ( -

Returns

+

Returns

@@ -601,7 +601,7 @@ hb_ot_layout_table_choose_script (

-

Returns

+

Returns

@@ -616,7 +616,7 @@ hb_ot_layout_table_find_script (

-

Returns

+

Returns

@@ -632,7 +632,7 @@ hb_ot_layout_table_get_feature_tags (

-

Returns

+

Returns

@@ -648,7 +648,7 @@ hb_ot_layout_table_get_script_tags (

-

Returns

+

Returns

@@ -725,7 +725,7 @@ hb_ot_shape_plan_collect_lookups (

-

Members

+

Members

diff --git a/docs/reference/html/harfbuzz-hb-ot-tag.html b/docs/reference/html/harfbuzz-hb-ot-tag.html index e909d29..058623f 100644 --- a/docs/reference/html/harfbuzz-hb-ot-tag.html +++ b/docs/reference/html/harfbuzz-hb-ot-tag.html @@ -107,7 +107,7 @@ hb_ot_tag_from_language ( -

Returns

+

Returns

@@ -119,7 +119,7 @@ hb_ot_tag_to_language ( -

Returns

+

Returns

@@ -131,7 +131,7 @@ hb_ot_tag_to_script ( -

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-set.html b/docs/reference/html/harfbuzz-hb-set.html index 3663879..87ce9bf 100644 --- a/docs/reference/html/harfbuzz-hb-set.html +++ b/docs/reference/html/harfbuzz-hb-set.html @@ -292,7 +292,7 @@ hb_set_add (hb_set_t *set, hb_codepoint_t codepoint);
-

Parameters

+

Parameters

@@ -316,7 +316,7 @@ hb_set_add_range (hb_codepoint_t first, hb_codepoint_t last);
-

Parameters

+

Parameters

@@ -338,7 +338,7 @@ hb_set_add_range (hb_bool_t hb_set_allocation_successful (const hb_set_t *set);
-

Parameters

+

Parameters

@@ -353,7 +353,7 @@ hb_set_allocation_successful (const
-

Returns

+

Returns

Since 1.0

@@ -364,7 +364,7 @@ hb_set_allocation_successful (const void hb_set_clear (hb_set_t *set);
-

Parameters

+

Parameters

@@ -388,7 +388,7 @@ hb_set_create (void

-

Returns

+

Returns

@@ -399,7 +399,7 @@ hb_set_create (void hb_set_del (hb_set_t *set, hb_codepoint_t codepoint);
-

Parameters

+

Parameters

@@ -423,7 +423,7 @@ hb_set_del_range (hb_codepoint_t first, hb_codepoint_t last);
-

Parameters

+

Parameters

@@ -445,7 +445,7 @@ hb_set_del_range (void hb_set_destroy (hb_set_t *set);
-

Parameters

+

Parameters

@@ -467,7 +467,7 @@ hb_set_destroy (hb_set_t * hb_set_get_empty (void);
-

Returns

+

Returns

.

[transfer full]

@@ -480,7 +480,7 @@ hb_set_get_empty (voidconst hb_set_t *set);

Finds the maximum number in the set.

-

Parameters

+

Parameters

@@ -495,7 +495,7 @@ hb_set_get_max (const -

Returns

+

Returns

minimum of the set, or HB_SET_VALUE_INVALID if set is empty.

@@ -508,7 +508,7 @@ hb_set_get_max (const const hb_set_t *set);

Finds the minimum number in the set.

-

Parameters

+

Parameters

@@ -523,7 +523,7 @@ hb_set_get_min (const -

Returns

+

Returns

minimum of the set, or HB_SET_VALUE_INVALID if set is empty.

@@ -536,7 +536,7 @@ hb_set_get_min (const const hb_set_t *set);

Returns the number of numbers in the set.

-

Parameters

+

Parameters

@@ -551,7 +551,7 @@ hb_set_get_population (const -

Returns

+

Returns

set population.

@@ -564,7 +564,7 @@ hb_set_get_population (const hb_set_t *set, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -579,7 +579,7 @@ hb_set_get_user_data ( -

Returns

+

Returns

.

[transfer none]

@@ -592,7 +592,7 @@ hb_set_get_user_data (const hb_set_t *set, hb_codepoint_t codepoint);
-

Parameters

+

Parameters

@@ -607,7 +607,7 @@ hb_set_has (const -

Returns

+

Returns

Since 1.0

@@ -619,7 +619,7 @@ hb_set_has (const hb_set_t *set, const hb_set_t *other);
-

Parameters

+

Parameters

@@ -641,7 +641,7 @@ hb_set_intersect (void hb_set_invert (hb_set_t *set);
-

Parameters

+

Parameters

@@ -663,7 +663,7 @@ hb_set_invert (hb_bool_t hb_set_is_empty (const hb_set_t *set);
-

Parameters

+

Parameters

@@ -678,7 +678,7 @@ hb_set_is_empty (const -

Returns

+

Returns

Since 1.0

@@ -690,7 +690,7 @@ hb_set_is_empty (const const hb_set_t *set, const hb_set_t *other);
-

Parameters

+

Parameters

@@ -705,7 +705,7 @@ hb_set_is_equal (const -

Returns

+

Returns

Since 1.0

@@ -717,7 +717,7 @@ hb_set_is_equal (const const hb_set_t *set, hb_codepoint_t *codepoint);
-

Parameters

+

Parameters

@@ -739,7 +739,7 @@ hb_set_next (const -

Returns

+

Returns

whether there was a next value.

@@ -757,7 +757,7 @@ hb_set_next_range (const last .

-

Parameters

+

Parameters

@@ -784,7 +784,7 @@ are greater than current value of last
-

Returns

+

Returns

whether there was a next range.

@@ -796,7 +796,7 @@ are greater than current value of last
hb_set_t *
 hb_set_reference (hb_set_t *set);
-

Parameters

+

Parameters

@@ -811,7 +811,7 @@ hb_set_reference ( -

Returns

+

Returns

.

[transfer full]

@@ -824,7 +824,7 @@ hb_set_reference (hb_set_t *set, const hb_set_t *other);
-

Parameters

+

Parameters

@@ -850,7 +850,7 @@ hb_set_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -873,7 +873,7 @@ hb_set_set_user_data ( -

Returns

+

Returns

Since 1.0

@@ -885,7 +885,7 @@ hb_set_set_user_data (hb_set_t *set, const hb_set_t *other);
-

Parameters

+

Parameters

@@ -908,7 +908,7 @@ hb_set_subtract (hb_set_t *set, const hb_set_t *other);
-

Parameters

+

Parameters

@@ -931,7 +931,7 @@ hb_set_symmetric_difference (hb_set_t *set, const hb_set_t *other);
-

Parameters

+

Parameters

diff --git a/docs/reference/html/harfbuzz-hb-shape-plan.html b/docs/reference/html/harfbuzz-hb-shape-plan.html index 0fd311f..d612552 100644 --- a/docs/reference/html/harfbuzz-hb-shape-plan.html +++ b/docs/reference/html/harfbuzz-hb-shape-plan.html @@ -151,7 +151,7 @@ hb_shape_plan_create ( -

Returns

+

Returns

@@ -165,7 +165,7 @@ hb_shape_plan_create_cached (unsigned int num_user_features, const char * const *shaper_list);
-

Parameters

+

Parameters

@@ -187,7 +187,7 @@ hb_shape_plan_create_cached ( -

Returns

+

Returns

.

[transfer full]

@@ -199,7 +199,7 @@ hb_shape_plan_create_cached (void hb_shape_plan_destroy (hb_shape_plan_t *shape_plan);
-

Parameters

+

Parameters

@@ -225,7 +225,7 @@ hb_shape_plan_execute (const hb_feature_t *features, unsigned int num_features);
-

Parameters

+

Parameters

@@ -257,7 +257,7 @@ hb_shape_plan_execute ( -

Returns

+

Returns

Since 1.0

@@ -268,7 +268,7 @@ hb_shape_plan_execute (hb_shape_plan_t * hb_shape_plan_get_empty (void);
-

Returns

+

Returns

.

[transfer full]

@@ -280,7 +280,7 @@ hb_shape_plan_get_empty (voidconst char * hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan);
-

Parameters

+

Parameters

@@ -295,7 +295,7 @@ hb_shape_plan_get_shaper ( -

Returns

+

Returns

.

[transfer none]

@@ -308,7 +308,7 @@ hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -323,7 +323,7 @@ hb_shape_plan_get_user_data ( -

Returns

+

Returns

.

[transfer none]

@@ -335,7 +335,7 @@ hb_shape_plan_get_user_data (hb_shape_plan_t * hb_shape_plan_reference (hb_shape_plan_t *shape_plan);
-

Parameters

+

Parameters

@@ -350,7 +350,7 @@ hb_shape_plan_reference ( -

Returns

+

Returns

.

[transfer full]

@@ -366,7 +366,7 @@ hb_shape_plan_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -381,7 +381,7 @@ hb_shape_plan_set_user_data ( -

Returns

+

Returns

Since 1.0

diff --git a/docs/reference/html/harfbuzz-hb-shape.html b/docs/reference/html/harfbuzz-hb-shape.html index 288025d..c055347 100644 --- a/docs/reference/html/harfbuzz-hb-shape.html +++ b/docs/reference/html/harfbuzz-hb-shape.html @@ -115,7 +115,7 @@ hb_feature_from_string (const cha int len, hb_feature_t *feature);
-

Parameters

+

Parameters

@@ -131,13 +131,13 @@ hb_feature_from_string (const cha - +

feature

.

[out][allow-none][out][optional]
-

Returns

+

Returns

Since 1.0

@@ -150,7 +150,7 @@ hb_feature_to_string (char *buf, unsigned int size);
-

Parameters

+

Parameters

@@ -175,7 +175,7 @@ hb_shape (const hb_feature_t *features, unsigned int num_features);
-

Parameters

+

Parameters

@@ -213,7 +213,7 @@ hb_shape_full (unsigned int num_features, const char * const *shaper_list);
-

Parameters

+

Parameters

@@ -245,7 +245,7 @@ hb_shape_full ( -

Returns

+

Returns

Since 1.0

@@ -256,7 +256,7 @@ hb_shape_full (const char ** hb_shape_list_shapers (void);
-

Returns

+

Returns

.

[transfer none]

diff --git a/docs/reference/html/harfbuzz-hb-unicode.html b/docs/reference/html/harfbuzz-hb-unicode.html index a5ee566..91358b2 100644 --- a/docs/reference/html/harfbuzz-hb-unicode.html +++ b/docs/reference/html/harfbuzz-hb-unicode.html @@ -356,7 +356,7 @@ hb_unicode_combining_class ( -

Returns

+

Returns

@@ -370,7 +370,7 @@ hb_unicode_combining_class ( -

Returns

+

Returns

@@ -383,7 +383,7 @@ hb_unicode_compose (hb_codepoint_t b, hb_codepoint_t *ab);
-

Parameters

+

Parameters

@@ -405,7 +405,7 @@ hb_unicode_compose ( -

Returns

+

Returns

Since 1.0

@@ -422,7 +422,7 @@ hb_unicode_compose ( -

Returns

+

Returns

@@ -435,7 +435,7 @@ hb_unicode_decompose (hb_codepoint_t *a, hb_codepoint_t *b);
-

Parameters

+

Parameters

@@ -462,7 +462,7 @@ hb_unicode_decompose ( -

Returns

+

Returns

Since 1.0

@@ -475,7 +475,7 @@ hb_unicode_decompose_compatibility (hb_codepoint_t u, hb_codepoint_t *decomposed);
-

Parameters

+

Parameters

@@ -497,7 +497,7 @@ hb_unicode_decompose_compatibility (
-

Returns

+

Returns

Since 1.0

@@ -514,7 +514,7 @@ hb_unicode_decompose_compatibility (

-

Returns

+

Returns

@@ -527,7 +527,7 @@ hb_unicode_eastasian_width ( -

Returns

+

Returns

@@ -539,7 +539,7 @@ hb_unicode_funcs_create ( -

Returns

+

Returns

@@ -549,7 +549,7 @@ hb_unicode_funcs_create (void hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
-

Parameters

+

Parameters

@@ -573,7 +573,7 @@ hb_unicode_funcs_get_default (voi

-

Returns

+

Returns

@@ -583,7 +583,7 @@ hb_unicode_funcs_get_default (voi
hb_unicode_funcs_t *
 hb_unicode_funcs_get_empty (void);
-

Returns

+

Returns

.

[transfer full]

@@ -595,7 +595,7 @@ hb_unicode_funcs_get_empty (void<
hb_unicode_funcs_t *
 hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
-

Parameters

+

Parameters

@@ -610,7 +610,7 @@ hb_unicode_funcs_get_parent ( -

Returns

+

Returns

Since 1.0

@@ -622,7 +622,7 @@ hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs, hb_user_data_key_t *key);
-

Parameters

+

Parameters

@@ -637,7 +637,7 @@ hb_unicode_funcs_get_user_data (
-

Returns

+

Returns

.

[transfer none]

@@ -649,7 +649,7 @@ hb_unicode_funcs_get_user_data (hb_bool_t hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs);
-

Parameters

+

Parameters

@@ -664,7 +664,7 @@ hb_unicode_funcs_is_immutable (
-

Returns

+

Returns

Since 1.0

@@ -675,7 +675,7 @@ hb_unicode_funcs_is_immutable (void hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs);
-

Parameters

+

Parameters

@@ -697,7 +697,7 @@ hb_unicode_funcs_make_immutable (hb_unicode_funcs_t * hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
-

Parameters

+

Parameters

@@ -712,7 +712,7 @@ hb_unicode_funcs_reference ( -

Returns

+

Returns

.

[transfer full]

@@ -728,7 +728,7 @@ hb_unicode_funcs_set_combining_class_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -753,7 +753,7 @@ hb_unicode_funcs_set_compose_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -779,7 +779,7 @@ hb_unicode_funcs_set_decompose_compatibility_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -804,7 +804,7 @@ hb_unicode_funcs_set_decompose_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -830,7 +830,7 @@ hb_unicode_funcs_set_eastasian_width_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -856,7 +856,7 @@ hb_unicode_funcs_set_general_category_func void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -881,7 +881,7 @@ hb_unicode_funcs_set_mirroring_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -906,7 +906,7 @@ hb_unicode_funcs_set_script_func (void *user_data, hb_destroy_func_t destroy);
-

Parameters

+

Parameters

@@ -932,7 +932,7 @@ hb_unicode_funcs_set_user_data (hb_destroy_func_t destroy, hb_bool_t replace);
-

Parameters

+

Parameters

@@ -947,7 +947,7 @@ hb_unicode_funcs_set_user_data (
-

Returns

+

Returns

Since 1.0

@@ -961,7 +961,7 @@ hb_unicode_general_category ( -

Returns

+

Returns

@@ -975,7 +975,7 @@ hb_unicode_general_category ( -

Returns

+

Returns

@@ -988,7 +988,7 @@ hb_unicode_mirroring ( -

Returns

+

Returns

@@ -1002,7 +1002,7 @@ hb_unicode_mirroring ( -

Returns

+

Returns

@@ -1015,7 +1015,7 @@ hb_unicode_script ( -

Returns

+

Returns

@@ -1029,7 +1029,7 @@ hb_unicode_script ( -

Returns

+

Returns

@@ -1041,7 +1041,7 @@ hb_unicode_script ( -

Members

+

Members

@@ -1352,7 +1352,7 @@ hb_unicode_script ( -

Members

+

Members

diff --git a/docs/reference/html/harfbuzz-hb-uniscribe.html b/docs/reference/html/harfbuzz-hb-uniscribe.html index eb90c9f..3b9645a 100644 --- a/docs/reference/html/harfbuzz-hb-uniscribe.html +++ b/docs/reference/html/harfbuzz-hb-uniscribe.html @@ -72,7 +72,7 @@ hb_uniscribe_font_get_hfont ( -

Returns

+

Returns

@@ -84,7 +84,7 @@ hb_uniscribe_font_get_logfontw (

-

Returns

+

Returns

diff --git a/docs/reference/html/harfbuzz-hb-version.html b/docs/reference/html/harfbuzz-hb-version.html index a20d726..3438e91 100644 --- a/docs/reference/html/harfbuzz-hb-version.html +++ b/docs/reference/html/harfbuzz-hb-version.html @@ -98,7 +98,7 @@ hb_version (unsigned int * unsigned int *minor, unsigned int *micro);
-

Parameters

+

Parameters

@@ -133,7 +133,7 @@ hb_version (unsigned int * hb_version_string (void);

Returns library version as a string with three components.

-

Returns

+

Returns

library version string.

@@ -152,7 +152,7 @@ hb_version_string (void

HB_VERSION_MICRO

-
#define HB_VERSION_MICRO 35
+
#define HB_VERSION_MICRO 40
 

@@ -168,7 +168,7 @@ hb_version_string (void

HB_VERSION_STRING

-
#define HB_VERSION_STRING "0.9.35"
+
#define HB_VERSION_STRING "0.9.40"
 

diff --git a/docs/reference/html/harfbuzz.devhelp2 b/docs/reference/html/harfbuzz.devhelp2 index 4fdf9d4..10bb40c 100644 --- a/docs/reference/html/harfbuzz.devhelp2 +++ b/docs/reference/html/harfbuzz.devhelp2 @@ -156,7 +156,7 @@ - + diff --git a/docs/reference/html/index.html b/docs/reference/html/index.html index d5cc2bb..772db71 100644 --- a/docs/reference/html/index.html +++ b/docs/reference/html/index.html @@ -15,7 +15,7 @@

- for HarfBuzz 0.9.35 + for HarfBuzz 0.9.40 .

diff --git a/docs/reference/html/index.sgml b/docs/reference/html/index.sgml index e9d29e0..7b469b5 100644 --- a/docs/reference/html/index.sgml +++ b/docs/reference/html/index.sgml @@ -485,10 +485,10 @@ - + diff --git a/docs/reference/version.xml b/docs/reference/version.xml index 8e99e29..f81283f 100644 --- a/docs/reference/version.xml +++ b/docs/reference/version.xml @@ -1 +1 @@ -0.9.35 +0.9.40 diff --git a/src/Makefile.am b/src/Makefile.am index ba07ac5..c99967f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,6 +13,9 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-introspection # The following warning options are useful for debugging: -Wpadded #AM_CXXFLAGS = +# Convenience targets: +lib: libharfbuzz.la + lib_LTLIBRARIES = libharfbuzz.la HBCFLAGS = @@ -234,8 +237,8 @@ hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS) $(AM_V_GEN) $(GLIB_MKENUMS) \ --identifier-prefix hb_ --symbol-prefix hb_gobject \ --template $^ | \ - sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@.tmp" && \ - mv "$@.tmp" "$@" || ( $(RM) "@.tmp" && false ) + sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \ + || ($(RM) "$@"; false) endif EXTRA_DIST += \ harfbuzz-gobject.pc.in \ @@ -251,8 +254,8 @@ EXTRA_DIST += \ -e 's@%libdir%@$(libdir)@g' \ -e 's@%includedir%@$(includedir)@g' \ -e 's@%VERSION%@$(VERSION)@g' \ - "$<" \ - > "$@.tmp" && mv "$@.tmp" "$@" || ( $(RM) "$@.tmp"; false ) + "$<" > "$@" \ + || ($(RM) "$@"; false) CLEANFILES += $(pkgconfig_DATA) @@ -265,8 +268,9 @@ harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS) sed -e 's/ (.*//' | \ LANG=C sort; \ echo LIBRARY libharfbuzz-$(HB_VERSION_MAJOR).dll; \ - ) >"$@.tmp" - @ ! grep -q hb_ERROR "$@.tmp" && mv "$@.tmp" "$@" || ($(RM) "$@"; false) + ) >"$@" + @ ! grep -q hb_ERROR "$@" \ + || ($(RM) "$@"; false) GENERATORS = \ @@ -278,26 +282,25 @@ EXTRA_DIST += $(GENERATORS) unicode-tables: arabic-table indic-table indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt - $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.cc.tmp && \ - mv hb-ot-shape-complex-indic-table.cc.tmp $(srcdir)/hb-ot-shape-complex-indic-table.cc || \ - ($(RM) hb-ot-shape-complex-indic-table.cc.tmp; false) + $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.cc \ + || ($(RM) hb-ot-shape-complex-indic-table.cc; false) arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt Blocks.txt - $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh.tmp && \ - mv hb-ot-shape-complex-arabic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-arabic-table.hh || \ - ($(RM) hb-ot-shape-complex-arabic-table.hh.tmp; false) + $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh \ + || ($(RM) hb-ot-shape-complex-arabic-table.hh; false) built-sources: $(BUILT_SOURCES) .PHONY: unicode-tables arabic-table indic-table built-sources -BUILT_SOURCES += \ - hb-buffer-deserialize-json.hh \ - hb-buffer-deserialize-text.hh \ - hb-ot-shape-complex-indic-machine.hh \ - hb-ot-shape-complex-myanmar-machine.hh \ - hb-ot-shape-complex-sea-machine.hh \ +RAGEL_GENERATED = \ + $(srcdir)/hb-buffer-deserialize-json.hh \ + $(srcdir)/hb-buffer-deserialize-text.hh \ + $(srcdir)/hb-ot-shape-complex-indic-machine.hh \ + $(srcdir)/hb-ot-shape-complex-myanmar-machine.hh \ + $(srcdir)/hb-ot-shape-complex-sea-machine.hh \ $(NULL) +BUILT_SOURCES += $(RAGEL_GENERATED) EXTRA_DIST += \ hb-buffer-deserialize-json.rl \ hb-buffer-deserialize-text.rl \ @@ -305,9 +308,10 @@ EXTRA_DIST += \ hb-ot-shape-complex-myanmar-machine.rl \ hb-ot-shape-complex-sea-machine.rl \ $(NULL) -.rl.hh: - $(AM_V_GEN)$(RAGEL) -e -F1 -o "$@.tmp" "$<" && \ - mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false ) +MAINTAINERCLEANFILES += $(RAGEL_GENERATED) +$(srcdir)/%.hh: $(srcdir)/%.rl + $(AM_V_GEN)(cd $(srcdir) && $(RAGEL) -e -F1 -o "$*.hh" "$*.rl") \ + || ($(RM) "$@"; false) noinst_PROGRAMS = \ main \ diff --git a/src/Makefile.in b/src/Makefile.in index 703d994..bd923e6 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -861,11 +861,7 @@ top_srcdir = @top_srcdir@ NULL = SUBDIRS = $(am__append_26) DIST_SUBDIRS = hb-ucdn -BUILT_SOURCES = $(am__append_37) hb-buffer-deserialize-json.hh \ - hb-buffer-deserialize-text.hh \ - hb-ot-shape-complex-indic-machine.hh \ - hb-ot-shape-complex-myanmar-machine.hh \ - hb-ot-shape-complex-sea-machine.hh $(NULL) +BUILT_SOURCES = $(am__append_37) $(RAGEL_GENERATED) EXTRA_DIST = harfbuzz.pc.in harfbuzz-icu.pc.in harfbuzz-gobject.pc.in \ hb-gobject-enums.cc.tmpl hb-gobject-enums.h.tmpl $(NULL) \ $(GENERATORS) hb-buffer-deserialize-json.rl \ @@ -875,11 +871,8 @@ EXTRA_DIST = harfbuzz.pc.in harfbuzz-icu.pc.in harfbuzz-gobject.pc.in \ hb-ot-shape-complex-sea-machine.rl $(NULL) CLEANFILES = $(pkgconfig_DATA) harfbuzz.def $(am__append_39) DISTCLEANFILES = $(am__append_38) -MAINTAINERCLEANFILES = +MAINTAINERCLEANFILES = $(RAGEL_GENERATED) DISTCHECK_CONFIGURE_FLAGS = --enable-introspection - -# The following warning options are useful for debugging: -Wpadded -#AM_CXXFLAGS = lib_LTLIBRARIES = libharfbuzz.la $(am__append_30) $(am__append_33) HBCFLAGS = $(am__append_4) $(am__append_6) $(am__append_10) \ $(am__append_14) $(am__append_18) $(am__append_22) \ @@ -943,6 +936,14 @@ GENERATORS = \ gen-indic-table.py \ $(NULL) +RAGEL_GENERATED = \ + $(srcdir)/hb-buffer-deserialize-json.hh \ + $(srcdir)/hb-buffer-deserialize-text.hh \ + $(srcdir)/hb-ot-shape-complex-indic-machine.hh \ + $(srcdir)/hb-ot-shape-complex-myanmar-machine.hh \ + $(srcdir)/hb-ot-shape-complex-sea-machine.hh \ + $(NULL) + main_SOURCES = main.cc main_CPPFLAGS = $(HBCFLAGS) main_LDADD = libharfbuzz.la $(HBLIBS) @@ -1014,7 +1015,7 @@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .cc .hh .lo .log .o .obj .rl .test .test$(EXEEXT) .trs +.SUFFIXES: .cc .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -2223,12 +2224,18 @@ uninstall-am: uninstall-binPROGRAMS uninstall-girDATA \ uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS \ uninstall-typelibDATA + +# The following warning options are useful for debugging: -Wpadded +#AM_CXXFLAGS = + +# Convenience targets: +lib: libharfbuzz.la @HAVE_GOBJECT_TRUE@hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS) @HAVE_GOBJECT_TRUE@ $(AM_V_GEN) $(GLIB_MKENUMS) \ @HAVE_GOBJECT_TRUE@ --identifier-prefix hb_ --symbol-prefix hb_gobject \ @HAVE_GOBJECT_TRUE@ --template $^ | \ -@HAVE_GOBJECT_TRUE@ sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@.tmp" && \ -@HAVE_GOBJECT_TRUE@ mv "$@.tmp" "$@" || ( $(RM) "@.tmp" && false ) +@HAVE_GOBJECT_TRUE@ sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \ +@HAVE_GOBJECT_TRUE@ || ($(RM) "$@"; false) %.pc: %.pc.in $(top_builddir)/config.status $(AM_V_GEN) \ @@ -2237,8 +2244,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-girDATA \ -e 's@%libdir%@$(libdir)@g' \ -e 's@%includedir%@$(includedir)@g' \ -e 's@%VERSION%@$(VERSION)@g' \ - "$<" \ - > "$@.tmp" && mv "$@.tmp" "$@" || ( $(RM) "$@.tmp"; false ) + "$<" > "$@" \ + || ($(RM) "$@"; false) harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS) $(AM_V_GEN) (echo EXPORTS; \ (cat $^ || echo 'hb_ERROR ()' ) | \ @@ -2246,27 +2253,26 @@ harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS) sed -e 's/ (.*//' | \ LANG=C sort; \ echo LIBRARY libharfbuzz-$(HB_VERSION_MAJOR).dll; \ - ) >"$@.tmp" - @ ! grep -q hb_ERROR "$@.tmp" && mv "$@.tmp" "$@" || ($(RM) "$@"; false) + ) >"$@" + @ ! grep -q hb_ERROR "$@" \ + || ($(RM) "$@"; false) unicode-tables: arabic-table indic-table indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt - $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.cc.tmp && \ - mv hb-ot-shape-complex-indic-table.cc.tmp $(srcdir)/hb-ot-shape-complex-indic-table.cc || \ - ($(RM) hb-ot-shape-complex-indic-table.cc.tmp; false) + $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.cc \ + || ($(RM) hb-ot-shape-complex-indic-table.cc; false) arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt Blocks.txt - $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh.tmp && \ - mv hb-ot-shape-complex-arabic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-arabic-table.hh || \ - ($(RM) hb-ot-shape-complex-arabic-table.hh.tmp; false) + $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh \ + || ($(RM) hb-ot-shape-complex-arabic-table.hh; false) built-sources: $(BUILT_SOURCES) .PHONY: unicode-tables arabic-table indic-table built-sources -.rl.hh: - $(AM_V_GEN)$(RAGEL) -e -F1 -o "$@.tmp" "$<" && \ - mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false ) +$(srcdir)/%.hh: $(srcdir)/%.rl + $(AM_V_GEN)(cd $(srcdir) && $(RAGEL) -e -F1 -o "$*.hh" "$*.rl") \ + || ($(RM) "$@"; false) @HAVE_INTROSPECTION_TRUE@-include $(INTROSPECTION_MAKEFILE) diff --git a/src/check-defs.sh b/src/check-defs.sh index 357347f..65a2467 100755 --- a/src/check-defs.sh +++ b/src/check-defs.sh @@ -21,7 +21,7 @@ for def in $defs; do lib=`echo "$def" | sed 's/[.]def$//;s@.*/@@'` so=.libs/lib${lib}.so - EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>' | cut -d' ' -f3`" + EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| llvm_' | cut -d' ' -f3`" if test -f "$so"; then diff --git a/src/check-libstdc++.sh b/src/check-libstdc++.sh index e7e0e29..27deb42 100755 --- a/src/check-libstdc++.sh +++ b/src/check-libstdc++.sh @@ -17,14 +17,14 @@ fi tested=false for suffix in so dylib; do so=.libs/libharfbuzz.$suffix - if test -f "$so"; then - echo "Checking that we are not linking to libstdc++" - if ldd $so | grep 'libstdc[+][+]'; then - echo "Ouch, linked to libstdc++" - stat=1 - fi - tested=true + if ! test -f "$so"; then continue; fi + + echo "Checking that we are not linking to libstdc++" + if ldd $so | grep 'libstdc[+][+]'; then + echo "Ouch, linked to libstdc++" + stat=1 fi + tested=true done if ! $tested; then echo "check-libstdc++.sh: libharfbuzz shared library not found; skipping test" diff --git a/src/check-static-inits.sh b/src/check-static-inits.sh index 83d02c8..1446fa7 100755 --- a/src/check-static-inits.sh +++ b/src/check-static-inits.sh @@ -22,8 +22,8 @@ fi echo "Checking that no object file has static initializers" for obj in $OBJS; do - if objdump -t "$obj" | grep '[.]ctors'; then - echo "Ouch, $obj has static initializers" + if objdump -t "$obj" | grep '[.][cd]tors' | grep -v '\<00*\>'; then + echo "Ouch, $obj has static initializers/finalizers" stat=1 fi done diff --git a/src/check-symbols.sh b/src/check-symbols.sh index e000b01..b2bf43f 100755 --- a/src/check-symbols.sh +++ b/src/check-symbols.sh @@ -16,11 +16,17 @@ fi echo "Checking that we are not exposing internal symbols" tested=false -for so in `ls .libs/lib*.so .libs/lib*.dylib 2>/dev/null` ; do +for suffix in so dylib; do + so=.libs/libharfbuzz.$suffix + if ! test -f "$so"; then continue; fi - EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>' | cut -d' ' -f3`" + EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| llvm_' | cut -d' ' -f3`" + prefix=`basename "$so" | sed 's/libharfbuzz/hb/; s/-/_/g; s/[.].*//'` + # On mac, C symbols are prefixed with _ + if test $suffix = dylib; then prefix="_$prefix"; fi + echo "Processing $so" if echo "$EXPORTED_SYMBOLS" | grep -v "^${prefix}_"; then echo "Ouch, internal symbols exposed" diff --git a/src/gen-indic-table.py b/src/gen-indic-table.py index 4fb76f4..f5716bd 100755 --- a/src/gen-indic-table.py +++ b/src/gen-indic-table.py @@ -209,7 +209,7 @@ for p in sorted(pages): for (start,end) in zip (starts, ends): if p not in [start>>page_bits, end>>page_bits]: continue offset = "indic_offset_0x%04xu" % start - print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end, start, offset) + print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset) for u,d in singles.items (): if p != u>>page_bits: continue print " if (unlikely (u == 0x%04Xu)) return _(%s,%s);" % (u, short[0][d[0]], short[1][d[1]]) diff --git a/src/hb-blob.cc b/src/hb-blob.cc index b82b4b2..8759a25 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -78,8 +78,8 @@ _hb_blob_destroy_user_data (hb_blob_t *blob) } /** - * hb_blob_create: (Xconstructor) - * @data: (array length=length) (closure user_data) (destroy destroy) (scope notified) (transfer none): Pointer to blob data. + * hb_blob_create: (skip) + * @data: Pointer to blob data. * @length: Length of @data in bytes. * @mode: Memory mode for @data. * @user_data: Data parameter to pass to @destroy. @@ -102,7 +102,10 @@ hb_blob_create (const char *data, { hb_blob_t *blob; - if (!length || !(blob = hb_object_create ())) { + if (!length || + length >= 1u << 31 || + data + length < data /* overflows */ || + !(blob = hb_object_create ())) { if (destroy) destroy (user_data); return hb_blob_get_empty (); diff --git a/src/hb-buffer-deserialize-json.hh b/src/hb-buffer-deserialize-json.hh index dead700..3f626bd 100644 --- a/src/hb-buffer-deserialize-json.hh +++ b/src/hb-buffer-deserialize-json.hh @@ -1,5 +1,5 @@ -#line 1 "../../src/hb-buffer-deserialize-json.rl" +#line 1 "hb-buffer-deserialize-json.rl" /* * Copyright © 2013 Google, Inc. * @@ -32,7 +32,7 @@ #include "hb-private.hh" -#line 36 "hb-buffer-deserialize-json.hh.tmp" +#line 36 "hb-buffer-deserialize-json.hh" static const unsigned char _deserialize_json_trans_keys[] = { 0u, 0u, 9u, 123u, 9u, 34u, 97u, 103u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, @@ -435,7 +435,7 @@ static const int deserialize_json_error = 0; static const int deserialize_json_en_main = 1; -#line 97 "../../src/hb-buffer-deserialize-json.rl" +#line 97 "hb-buffer-deserialize-json.rl" static hb_bool_t @@ -459,15 +459,15 @@ _hb_buffer_deserialize_glyphs_json (hb_buffer_t *buffer, const char *tok = NULL; int cs; - hb_glyph_info_t info; - hb_glyph_position_t pos; + hb_glyph_info_t info = {0}; + hb_glyph_position_t pos = {0}; -#line 466 "hb-buffer-deserialize-json.hh.tmp" +#line 466 "hb-buffer-deserialize-json.hh" { cs = deserialize_json_start; } -#line 471 "hb-buffer-deserialize-json.hh.tmp" +#line 471 "hb-buffer-deserialize-json.hh" { int _slen; int _trans; @@ -493,14 +493,14 @@ _resume: switch ( _deserialize_json_trans_actions[_trans] ) { case 1: -#line 38 "../../src/hb-buffer-deserialize-json.rl" +#line 38 "hb-buffer-deserialize-json.rl" { memset (&info, 0, sizeof (info)); memset (&pos , 0, sizeof (pos )); } break; case 5: -#line 43 "../../src/hb-buffer-deserialize-json.rl" +#line 43 "hb-buffer-deserialize-json.rl" { buffer->add_info (info); if (buffer->in_error) @@ -510,13 +510,13 @@ _resume: } break; case 2: -#line 51 "../../src/hb-buffer-deserialize-json.rl" +#line 51 "hb-buffer-deserialize-json.rl" { tok = p; } break; case 14: -#line 55 "../../src/hb-buffer-deserialize-json.rl" +#line 55 "hb-buffer-deserialize-json.rl" { if (!hb_font_glyph_from_string (font, tok, p - tok, @@ -525,33 +525,33 @@ _resume: } break; case 15: -#line 62 "../../src/hb-buffer-deserialize-json.rl" +#line 62 "hb-buffer-deserialize-json.rl" { if (!parse_uint (tok, p, &info.codepoint)) return false; } break; case 8: -#line 63 "../../src/hb-buffer-deserialize-json.rl" +#line 63 "hb-buffer-deserialize-json.rl" { if (!parse_uint (tok, p, &info.cluster )) return false; } break; case 10: -#line 64 "../../src/hb-buffer-deserialize-json.rl" +#line 64 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.x_offset )) return false; } break; case 12: -#line 65 "../../src/hb-buffer-deserialize-json.rl" +#line 65 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.y_offset )) return false; } break; case 3: -#line 66 "../../src/hb-buffer-deserialize-json.rl" +#line 66 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.x_advance)) return false; } break; case 6: -#line 67 "../../src/hb-buffer-deserialize-json.rl" +#line 67 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.y_advance)) return false; } break; case 16: -#line 62 "../../src/hb-buffer-deserialize-json.rl" +#line 62 "hb-buffer-deserialize-json.rl" { if (!parse_uint (tok, p, &info.codepoint)) return false; } -#line 43 "../../src/hb-buffer-deserialize-json.rl" +#line 43 "hb-buffer-deserialize-json.rl" { buffer->add_info (info); if (buffer->in_error) @@ -561,9 +561,9 @@ _resume: } break; case 9: -#line 63 "../../src/hb-buffer-deserialize-json.rl" +#line 63 "hb-buffer-deserialize-json.rl" { if (!parse_uint (tok, p, &info.cluster )) return false; } -#line 43 "../../src/hb-buffer-deserialize-json.rl" +#line 43 "hb-buffer-deserialize-json.rl" { buffer->add_info (info); if (buffer->in_error) @@ -573,9 +573,9 @@ _resume: } break; case 11: -#line 64 "../../src/hb-buffer-deserialize-json.rl" +#line 64 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.x_offset )) return false; } -#line 43 "../../src/hb-buffer-deserialize-json.rl" +#line 43 "hb-buffer-deserialize-json.rl" { buffer->add_info (info); if (buffer->in_error) @@ -585,9 +585,9 @@ _resume: } break; case 13: -#line 65 "../../src/hb-buffer-deserialize-json.rl" +#line 65 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.y_offset )) return false; } -#line 43 "../../src/hb-buffer-deserialize-json.rl" +#line 43 "hb-buffer-deserialize-json.rl" { buffer->add_info (info); if (buffer->in_error) @@ -597,9 +597,9 @@ _resume: } break; case 4: -#line 66 "../../src/hb-buffer-deserialize-json.rl" +#line 66 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.x_advance)) return false; } -#line 43 "../../src/hb-buffer-deserialize-json.rl" +#line 43 "hb-buffer-deserialize-json.rl" { buffer->add_info (info); if (buffer->in_error) @@ -609,9 +609,9 @@ _resume: } break; case 7: -#line 67 "../../src/hb-buffer-deserialize-json.rl" +#line 67 "hb-buffer-deserialize-json.rl" { if (!parse_int (tok, p, &pos.y_advance)) return false; } -#line 43 "../../src/hb-buffer-deserialize-json.rl" +#line 43 "hb-buffer-deserialize-json.rl" { buffer->add_info (info); if (buffer->in_error) @@ -620,7 +620,7 @@ _resume: *end_ptr = p; } break; -#line 624 "hb-buffer-deserialize-json.hh.tmp" +#line 624 "hb-buffer-deserialize-json.hh" } _again: @@ -632,7 +632,7 @@ _again: _out: {} } -#line 125 "../../src/hb-buffer-deserialize-json.rl" +#line 125 "hb-buffer-deserialize-json.rl" *end_ptr = p; diff --git a/src/hb-buffer-deserialize-json.rl b/src/hb-buffer-deserialize-json.rl index 7351b2a..91b350f 100644 --- a/src/hb-buffer-deserialize-json.rl +++ b/src/hb-buffer-deserialize-json.rl @@ -117,8 +117,8 @@ _hb_buffer_deserialize_glyphs_json (hb_buffer_t *buffer, const char *tok = NULL; int cs; - hb_glyph_info_t info; - hb_glyph_position_t pos; + hb_glyph_info_t info = {0}; + hb_glyph_position_t pos = {0}; %%{ write init; write exec; diff --git a/src/hb-buffer-deserialize-text.hh b/src/hb-buffer-deserialize-text.hh index a38efe3..7a46ab2 100644 --- a/src/hb-buffer-deserialize-text.hh +++ b/src/hb-buffer-deserialize-text.hh @@ -1,5 +1,5 @@ -#line 1 "../../src/hb-buffer-deserialize-text.rl" +#line 1 "hb-buffer-deserialize-text.rl" /* * Copyright © 2013 Google, Inc. * @@ -32,7 +32,7 @@ #include "hb-private.hh" -#line 36 "hb-buffer-deserialize-text.hh.tmp" +#line 36 "hb-buffer-deserialize-text.hh" static const unsigned char _deserialize_text_trans_keys[] = { 0u, 0u, 9u, 122u, 45u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 44u, 57u, 9u, 124u, 9u, 124u, 0u, 0u, @@ -312,7 +312,7 @@ static const int deserialize_text_error = 0; static const int deserialize_text_en_main = 1; -#line 91 "../../src/hb-buffer-deserialize-text.rl" +#line 91 "hb-buffer-deserialize-text.rl" static hb_bool_t @@ -339,12 +339,12 @@ _hb_buffer_deserialize_glyphs_text (hb_buffer_t *buffer, hb_glyph_info_t info; hb_glyph_position_t pos; -#line 343 "hb-buffer-deserialize-text.hh.tmp" +#line 343 "hb-buffer-deserialize-text.hh" { cs = deserialize_text_start; } -#line 348 "hb-buffer-deserialize-text.hh.tmp" +#line 348 "hb-buffer-deserialize-text.hh" { int _slen; int _trans; @@ -370,13 +370,13 @@ _resume: switch ( _deserialize_text_trans_actions[_trans] ) { case 2: -#line 51 "../../src/hb-buffer-deserialize-text.rl" +#line 51 "hb-buffer-deserialize-text.rl" { tok = p; } break; case 5: -#line 55 "../../src/hb-buffer-deserialize-text.rl" +#line 55 "hb-buffer-deserialize-text.rl" { if (!hb_font_glyph_from_string (font, tok, p - tok, @@ -385,41 +385,41 @@ _resume: } break; case 10: -#line 62 "../../src/hb-buffer-deserialize-text.rl" +#line 62 "hb-buffer-deserialize-text.rl" { if (!parse_uint (tok, p, &info.cluster )) return false; } break; case 3: -#line 63 "../../src/hb-buffer-deserialize-text.rl" +#line 63 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.x_offset )) return false; } break; case 12: -#line 64 "../../src/hb-buffer-deserialize-text.rl" +#line 64 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.y_offset )) return false; } break; case 7: -#line 65 "../../src/hb-buffer-deserialize-text.rl" +#line 65 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.x_advance)) return false; } break; case 1: -#line 38 "../../src/hb-buffer-deserialize-text.rl" +#line 38 "hb-buffer-deserialize-text.rl" { memset (&info, 0, sizeof (info)); memset (&pos , 0, sizeof (pos )); } -#line 51 "../../src/hb-buffer-deserialize-text.rl" +#line 51 "hb-buffer-deserialize-text.rl" { tok = p; } break; case 4: -#line 55 "../../src/hb-buffer-deserialize-text.rl" +#line 55 "hb-buffer-deserialize-text.rl" { if (!hb_font_glyph_from_string (font, tok, p - tok, &info.codepoint)) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -429,9 +429,9 @@ _resume: } break; case 9: -#line 62 "../../src/hb-buffer-deserialize-text.rl" +#line 62 "hb-buffer-deserialize-text.rl" { if (!parse_uint (tok, p, &info.cluster )) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -441,9 +441,9 @@ _resume: } break; case 11: -#line 64 "../../src/hb-buffer-deserialize-text.rl" +#line 64 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.y_offset )) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -453,9 +453,9 @@ _resume: } break; case 6: -#line 65 "../../src/hb-buffer-deserialize-text.rl" +#line 65 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.x_advance)) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -465,9 +465,9 @@ _resume: } break; case 8: -#line 66 "../../src/hb-buffer-deserialize-text.rl" +#line 66 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.y_advance)) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -476,7 +476,7 @@ _resume: *end_ptr = p; } break; -#line 480 "hb-buffer-deserialize-text.hh.tmp" +#line 480 "hb-buffer-deserialize-text.hh" } _again: @@ -489,14 +489,14 @@ _again: { switch ( _deserialize_text_eof_actions[cs] ) { case 4: -#line 55 "../../src/hb-buffer-deserialize-text.rl" +#line 55 "hb-buffer-deserialize-text.rl" { if (!hb_font_glyph_from_string (font, tok, p - tok, &info.codepoint)) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -506,9 +506,9 @@ _again: } break; case 9: -#line 62 "../../src/hb-buffer-deserialize-text.rl" +#line 62 "hb-buffer-deserialize-text.rl" { if (!parse_uint (tok, p, &info.cluster )) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -518,9 +518,9 @@ _again: } break; case 11: -#line 64 "../../src/hb-buffer-deserialize-text.rl" +#line 64 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.y_offset )) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -530,9 +530,9 @@ _again: } break; case 6: -#line 65 "../../src/hb-buffer-deserialize-text.rl" +#line 65 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.x_advance)) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -542,9 +542,9 @@ _again: } break; case 8: -#line 66 "../../src/hb-buffer-deserialize-text.rl" +#line 66 "hb-buffer-deserialize-text.rl" { if (!parse_int (tok, p, &pos.y_advance)) return false; } -#line 43 "../../src/hb-buffer-deserialize-text.rl" +#line 43 "hb-buffer-deserialize-text.rl" { buffer->add_info (info); if (buffer->in_error) @@ -553,14 +553,14 @@ _again: *end_ptr = p; } break; -#line 557 "hb-buffer-deserialize-text.hh.tmp" +#line 557 "hb-buffer-deserialize-text.hh" } } _out: {} } -#line 119 "../../src/hb-buffer-deserialize-text.rl" +#line 119 "hb-buffer-deserialize-text.rl" *end_ptr = p; diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 74ae273..b9fe263 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -443,7 +443,7 @@ hb_buffer_t::reverse_range (unsigned int start, { unsigned int i, j; - if (start == end - 1) + if (end - start < 2) return; for (i = start, j = end - 1; i < j; i++, j--) { @@ -454,7 +454,7 @@ hb_buffer_t::reverse_range (unsigned int start, info[j] = t; } - if (pos) { + if (have_positions) { for (i = start, j = end - 1; i < j; i++, j--) { hb_glyph_position_t t; @@ -1328,15 +1328,15 @@ hb_buffer_guess_segment_properties (hb_buffer_t *buffer) buffer->guess_segment_properties (); } -template +template static inline void hb_buffer_add_utf (hb_buffer_t *buffer, - const T *text, + const typename utf_t::codepoint_t *text, int text_length, unsigned int item_offset, int item_length) { - typedef hb_utf_t utf_t; + typedef typename utf_t::codepoint_t T; const hb_codepoint_t replacement = buffer->replacement; assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || @@ -1400,7 +1400,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer, /** * hb_buffer_add_utf8: * @buffer: a buffer. - * @text: (array length=text_length): + * @text: (array length=text_length) (element-type uint8_t): * @text_length: * @item_offset: * @item_length: @@ -1416,7 +1416,7 @@ hb_buffer_add_utf8 (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { - hb_buffer_add_utf (buffer, (const uint8_t *) text, text_length, item_offset, item_length); + hb_buffer_add_utf (buffer, (const uint8_t *) text, text_length, item_offset, item_length); } /** @@ -1438,7 +1438,7 @@ hb_buffer_add_utf16 (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { - hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); + hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); } /** @@ -1460,7 +1460,29 @@ hb_buffer_add_utf32 (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { - hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); + hb_buffer_add_utf > (buffer, text, text_length, item_offset, item_length); +} + +/** + * hb_buffer_add_latin1: + * @buffer: a buffer. + * @text: (array length=text_length) (element-type uint8_t): + * @text_length: + * @item_offset: + * @item_length: + * + * + * + * Since: 1.0 + **/ +void +hb_buffer_add_latin1 (hb_buffer_t *buffer, + const uint8_t *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); } /** @@ -1482,7 +1504,7 @@ hb_buffer_add_codepoints (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { - hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); + hb_buffer_add_utf > (buffer, text, text_length, item_offset, item_length); } diff --git a/src/hb-buffer.h b/src/hb-buffer.h index 7b0c920..e5b46d8 100644 --- a/src/hb-buffer.h +++ b/src/hb-buffer.h @@ -253,6 +253,14 @@ hb_buffer_add_utf32 (hb_buffer_t *buffer, unsigned int item_offset, int item_length); +/* Allows only access to first 256 Unicode codepoints. */ +void +hb_buffer_add_latin1 (hb_buffer_t *buffer, + const uint8_t *text, + int text_length, + unsigned int item_offset, + int item_length); + /* Like add_utf32 but does NOT check for invalid Unicode codepoints. */ void hb_buffer_add_codepoints (hb_buffer_t *buffer, diff --git a/src/hb-common.cc b/src/hb-common.cc index a6a5144..05a1f9c 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -235,7 +235,7 @@ struct hb_language_item_t { static hb_language_item_t *langs; #ifdef HB_USE_ATEXIT -static inline +static void free_langs (void) { while (langs) { @@ -265,6 +265,7 @@ retry: *lang = key; if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) { + lang->finish (); free (lang); goto retry; } @@ -345,7 +346,7 @@ hb_language_get_default (void) hb_language_t language = (hb_language_t) hb_atomic_ptr_get (&default_language); if (unlikely (language == HB_LANGUAGE_INVALID)) { language = hb_language_from_string (setlocale (LC_CTYPE, NULL), -1); - hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language); + (void) hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language); } return default_language; diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 9097cce..4a45175 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -140,6 +140,7 @@ hb_coretext_face_get_cg_font (hb_face_t *face) struct hb_coretext_shaper_font_data_t { CTFontRef ct_font; + CGFloat x_mult, y_mult; /* From CT space to HB space. */ }; hb_coretext_shaper_font_data_t * @@ -154,7 +155,17 @@ _hb_coretext_shaper_font_data_create (hb_font_t *font) hb_face_t *face = font->face; hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); - data->ct_font = CTFontCreateWithGraphicsFont (face_data, font->y_scale, NULL, NULL); + /* Choose a CoreText font size and calculate multipliers to convert to HarfBuzz space. */ + CGFloat font_size = 36.; /* Default... */ + /* No idea if the following is even a good idea. */ + if (font->y_ppem) + font_size = font->y_ppem; + + if (font_size < 0) + font_size = -font_size; + data->x_mult = (CGFloat) font->x_scale / font_size; + data->y_mult = (CGFloat) font->y_scale / font_size; + data->ct_font = CTFontCreateWithGraphicsFont (face_data, font_size, NULL, NULL); if (unlikely (!data->ct_font)) { DEBUG_MSG (CORETEXT, font, "Font CTFontCreateWithGraphicsFont() failed"); free (data); @@ -327,7 +338,7 @@ struct range_record_t { #define kUpperCaseType 38 /* Table data courtesy of Apple. */ -struct feature_mapping_t { +static const struct feature_mapping_t { FourCharCode otFeatureTag; uint16_t aatFeatureType; uint16_t selectorToEnable; @@ -776,6 +787,7 @@ retry: buffer->len = 0; uint32_t status_and = ~0, status_or = 0; + double advances_so_far = 0; const CFRange range_all = CFRangeMake (0, 0); @@ -786,6 +798,10 @@ retry: status_or |= run_status; status_and &= run_status; DEBUG_MSG (CORETEXT, run, "CTRunStatus: %x", run_status); + double run_advance = CTRunGetTypographicBounds (run, range_all, NULL, NULL, NULL); + if (HB_DIRECTION_IS_VERTICAL (buffer->props.direction)) + run_advance = -run_advance; + DEBUG_MSG (CORETEXT, run, "Run advance: %g", run_advance); /* CoreText does automatic font fallback (AKA "cascading") for characters * not supported by the requested font, and provides no way to turn it off, @@ -860,8 +876,14 @@ retry: goto resize_and_retry; hb_glyph_info_t *info = buffer->info + buffer->len; - CGGlyph notdef = 0; - double advance = CTFontGetAdvancesForGlyphs (font_data->ct_font, kCTFontHorizontalOrientation, ¬def, NULL, 1); + hb_codepoint_t notdef = 0; + hb_direction_t dir = buffer->props.direction; + hb_position_t x_advance, y_advance, x_offset, y_offset; + hb_font_get_glyph_advance_for_direction (font, notdef, dir, &x_advance, &y_advance); + hb_font_get_glyph_origin_for_direction (font, notdef, dir, &x_offset, &y_offset); + hb_position_t advance = x_advance + y_advance; + x_offset = -x_offset; + y_offset = -y_offset; unsigned int old_len = buffer->len; for (CFIndex j = range.location; j < range.location + range.length; j++) @@ -875,19 +897,22 @@ retry: * for this one. */ continue; } + if (buffer->unicode->is_default_ignorable (ch)) + continue; info->codepoint = notdef; info->cluster = log_clusters[j]; info->mask = advance; - info->var1.u32 = 0; - info->var2.u32 = 0; + info->var1.u32 = x_offset; + info->var2.u32 = y_offset; info++; buffer->len++; } if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) buffer->reverse_range (old_len, buffer->len); + advances_so_far += run_advance; continue; } } @@ -917,7 +942,7 @@ retry: scratch_size = scratch_size_saved; \ scratch = scratch_saved; - { + { /* Setup glyphs */ SCRATCH_SAVE(); const CGGlyph* glyphs = USE_PTR ? CTRunGetGlyphsPtr (run) : NULL; if (!glyphs) { @@ -941,6 +966,11 @@ retry: SCRATCH_RESTORE(); } { + /* Setup positions. + * Note that CoreText does not return advances for glyphs. As such, + * for all but last glyph, we use the delta position to next glyph as + * advance (in the advance direction only), and for last glyph we set + * whatever is needed to make the whole run's advance add up. */ SCRATCH_SAVE(); const CGPoint* positions = USE_PTR ? CTRunGetPositionsPtr (run) : NULL; if (!positions) { @@ -948,33 +978,42 @@ retry: CTRunGetPositions (run, range_all, position_buf); positions = position_buf; } - double run_advance = CTRunGetTypographicBounds (run, range_all, NULL, NULL, NULL); - DEBUG_MSG (CORETEXT, run, "Run advance: %g", run_advance); hb_glyph_info_t *info = run_info; + CGFloat x_mult = font_data->x_mult, y_mult = font_data->y_mult; if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction)) { + hb_position_t x_offset = (positions[0].x - advances_so_far) * x_mult; for (unsigned int j = 0; j < num_glyphs; j++) { - double advance = (j + 1 < num_glyphs ? positions[j + 1].x : positions[0].x + run_advance) - positions[j].x; - info->mask = advance; - info->var1.u32 = positions[0].x; /* Yes, zero. */ - info->var2.u32 = positions[j].y; + double advance; + if (likely (j + 1 < num_glyphs)) + advance = positions[j + 1].x - positions[j].x; + else /* last glyph */ + advance = run_advance - (positions[j].x - positions[0].x); + info->mask = advance * x_mult; + info->var1.u32 = x_offset; + info->var2.u32 = positions[j].y * y_mult; info++; } } else { - run_advance = -run_advance; + hb_position_t y_offset = (positions[0].y - advances_so_far) * y_mult; for (unsigned int j = 0; j < num_glyphs; j++) { - double advance = (j + 1 < num_glyphs ? positions[j + 1].y : positions[0].y + run_advance) - positions[j].y; - info->mask = advance; - info->var1.u32 = positions[j].x; - info->var2.u32 = positions[0].y; /* Yes, zero. */ + double advance; + if (likely (j + 1 < num_glyphs)) + advance = positions[j + 1].y - positions[j].y; + else /* last glyph */ + advance = run_advance - (positions[j].y - positions[0].y); + info->mask = advance * y_mult; + info->var1.u32 = positions[j].x * x_mult; + info->var2.u32 = y_offset; info++; } } SCRATCH_RESTORE(); + advances_so_far += run_advance; } #undef SCRATCH_RESTORE #undef SCRATCH_SAVE diff --git a/src/hb-face-private.hh b/src/hb-face-private.hh index 6520d3d..c4266ff 100644 --- a/src/hb-face-private.hh +++ b/src/hb-face-private.hh @@ -66,7 +66,7 @@ struct hb_face_t { { hb_blob_t *blob; - if (unlikely (!this || !reference_table_func)) + if (unlikely (!reference_table_func)) return hb_blob_get_empty (); blob = reference_table_func (/*XXX*/const_cast (this), tag, user_data); diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 16bf51f..322f93a 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -51,6 +51,13 @@ * In particular, FT_Get_Advance() without the NO_HINTING flag seems to be * buggy. * + * FreeType works in 26.6 mode. Clients can decide to use that mode, and everything + * would work fine. However, we also abuse this API for performing in font-space, + * but don't pass the correct flags to FreeType. We just abuse the no-hinting mode + * for that, such that no rounding etc happens. As such, we don't set ppem, and + * pass NO_HINTING around. This seems to work best, until we go ahead and add a full + * load_flags API. + * * - We don't handle / allow for emboldening / obliqueing. * * - In the future, we should add constructors to create fonts in font space? @@ -70,12 +77,10 @@ hb_ft_get_glyph (hb_font_t *font HB_UNUSED, { FT_Face ft_face = (FT_Face) font_data; -#ifdef HAVE_FT_FACE_GETCHARVARIANTINDEX if (unlikely (variation_selector)) { *glyph = FT_Face_GetCharVariantIndex (ft_face, unicode, variation_selector); return *glyph != 0; } -#endif *glyph = FT_Get_Char_Index (ft_face, unicode); return *glyph != 0; @@ -94,6 +99,9 @@ hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED, if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v))) return 0; + if (font->x_scale < 0) + v = -v; + return (v + (1<<9)) >> 10; } @@ -110,6 +118,9 @@ hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED, if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v))) return 0; + if (font->y_scale < 0) + v = -v; + /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates * have a Y growing upward. Hence the extra negation. */ return (-v + (1<<9)) >> 10; @@ -136,7 +147,7 @@ hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED, void *user_data HB_UNUSED) { FT_Face ft_face = (FT_Face) font_data; - int load_flags = FT_LOAD_DEFAULT; + int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING; if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags))) return false; @@ -146,6 +157,11 @@ hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED, *x = ft_face->glyph->metrics.horiBearingX - ft_face->glyph->metrics.vertBearingX; *y = ft_face->glyph->metrics.horiBearingY - (-ft_face->glyph->metrics.vertBearingY); + if (font->x_scale < 0) + *x = -*x; + if (font->y_scale < 0) + *y = -*y; + return true; } @@ -185,7 +201,7 @@ hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED, void *user_data HB_UNUSED) { FT_Face ft_face = (FT_Face) font_data; - int load_flags = FT_LOAD_DEFAULT; + int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING; if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags))) return false; @@ -340,11 +356,7 @@ hb_ft_face_create (FT_Face ft_face, blob = hb_blob_create ((const char *) ft_face->stream->base, (unsigned int) ft_face->stream->size, - /* TODO: We assume that it's mmap()'ed, but FreeType code - * suggests that there are cases we reach here but font is - * not mmapped. For example, when mmap() fails. No idea - * how to deal with it better here. */ - HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, + HB_MEMORY_MODE_READONLY, ft_face, destroy); face = hb_face_create (blob, ft_face->face_index); hb_blob_destroy (blob); @@ -358,6 +370,22 @@ hb_ft_face_create (FT_Face ft_face, return face; } +/** + * hb_ft_face_create_referenced: + * @ft_face: + * + * + * + * Return value: (transfer full): + * Since: 1.0 + **/ +hb_face_t * +hb_ft_face_create_referenced (FT_Face ft_face) +{ + FT_Reference_Face (ft_face); + return hb_ft_face_create (ft_face, (hb_destroy_func_t) FT_Done_Face); +} + static void hb_ft_face_finalize (FT_Face ft_face) { @@ -420,23 +448,43 @@ hb_ft_font_create (FT_Face ft_face, hb_font_set_scale (font, (int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16), (int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16)); +#if 0 /* hb-ft works in no-hinting model */ hb_font_set_ppem (font, ft_face->size->metrics.x_ppem, ft_face->size->metrics.y_ppem); +#endif return font; } +/** + * hb_ft_font_create_referenced: + * @ft_face: + * + * + * + * Return value: (transfer full): + * Since: 1.0 + **/ +hb_font_t * +hb_ft_font_create_referenced (FT_Face ft_face) +{ + FT_Reference_Face (ft_face); + return hb_ft_font_create (ft_face, (hb_destroy_func_t) FT_Done_Face); +} + /* Thread-safe, lock-free, FT_Library */ static FT_Library ft_library; -static inline +#ifdef HB_USE_ATEXIT +static void free_ft_library (void) { FT_Done_FreeType (ft_library); } +#endif static FT_Library get_ft_library (void) @@ -493,14 +541,19 @@ hb_ft_font_set_funcs (hb_font_t *font) FT_Select_Charmap (ft_face, FT_ENCODING_UNICODE); - assert (font->y_scale >= 0); FT_Set_Char_Size (ft_face, - font->x_scale, font->y_scale, + abs (font->x_scale), abs (font->y_scale), 0, 0); #if 0 font->x_ppem * 72 * 64 / font->x_scale, font->y_ppem * 72 * 64 / font->y_scale); #endif + if (font->x_scale < 0 || font->y_scale < 0) + { + FT_Matrix matrix = { font->x_scale < 0 ? -1 : +1, 0, + 0, font->y_scale < 0 ? -1 : +1}; + FT_Set_Transform (ft_face, &matrix, NULL); + } ft_face->generic.data = blob; ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob; diff --git a/src/hb-ft.h b/src/hb-ft.h index 696251e..92f4b36 100644 --- a/src/hb-ft.h +++ b/src/hb-ft.h @@ -34,19 +34,76 @@ HB_BEGIN_DECLS -/* Note: FreeType is not thread-safe. Hence, these functions are not either. */ +/* + * Note: FreeType is not thread-safe. + * Hence, these functions are not either. + */ + +/* + * hb-face from ft-face. + */ +/* This one creates a new hb-face for given ft-face. + * When the returned hb-face is destroyed, the destroy + * callback is called (if not NULL), with the ft-face passed + * to it. + * + * The client is responsible to make sure that ft-face is + * destroyed after hb-face is destroyed. + * + * Most often you don't want this function. You should use either + * hb_ft_face_create_cached(), or hb_ft_face_create_referenced(). + * In particular, if you are going to pass NULL as destroy, you + * probably should use (the more recent) hb_ft_face_create_referenced() + * instead. + */ hb_face_t * hb_ft_face_create (FT_Face ft_face, hb_destroy_func_t destroy); +/* This version is like hb_ft_face_create(), except that it caches + * the hb-face using the generic pointer of the ft-face. This means + * that subsequent calls to this function with the same ft-face will + * return the same hb-face (correctly referenced). + * + * Client is still responsible for making sure that ft-face is destroyed + * after hb-face is. + */ hb_face_t * hb_ft_face_create_cached (FT_Face ft_face); +/* This version is like hb_ft_face_create(), except that it calls + * FT_Reference_Face() on ft-face, as such keeping ft-face alive + * as long as the hb-face is. + * + * This is the most convenient version to use. Use it unless you have + * very good reasons not to. + */ +hb_face_t * +hb_ft_face_create_referenced (FT_Face ft_face); + + +/* + * hb-font from ft-face. + */ + +/* + * Note: + * + * Set face size on ft-face before creating hb-font from it. + * Otherwise hb-ft would NOT pick up the font size correctly. + */ + +/* See notes on hb_ft_face_create(). Same issues re lifecycle-management + * apply here. Use hb_ft_font_create_referenced() if you can. */ hb_font_t * hb_ft_font_create (FT_Face ft_face, hb_destroy_func_t destroy); +/* See notes on hb_ft_face_create_referenced() re lifecycle-management + * issues. */ +hb_font_t * +hb_ft_font_create_referenced (FT_Face ft_face); /* Makes an hb_font_t use FreeType internally to implement font functions. */ diff --git a/src/hb-glib.cc b/src/hb-glib.cc index af43cab..61dff5e 100644 --- a/src/hb-glib.cc +++ b/src/hb-glib.cc @@ -382,3 +382,14 @@ hb_glib_get_unicode_funcs (void) return const_cast (&_hb_glib_unicode_funcs); } +hb_blob_t * +hb_glib_blob_create (GBytes *gbytes) +{ + gsize size = 0; + gconstpointer data = g_bytes_get_data (gbytes, &size); + return hb_blob_create ((const char *) data, + size, + HB_MEMORY_MODE_READONLY, + g_bytes_ref (gbytes), + (hb_destroy_func_t) g_bytes_unref); +} diff --git a/src/hb-glib.h b/src/hb-glib.h index 63a9d33..1a8f42e 100644 --- a/src/hb-glib.h +++ b/src/hb-glib.h @@ -46,6 +46,9 @@ hb_glib_script_from_script (hb_script_t script); hb_unicode_funcs_t * hb_glib_get_unicode_funcs (void); +hb_blob_t * +hb_glib_blob_create (GBytes *gbytes); + HB_END_DECLS diff --git a/src/hb-icu.cc b/src/hb-icu.cc index 86c8b5c..24cec9d 100644 --- a/src/hb-icu.cc +++ b/src/hb-icu.cc @@ -363,10 +363,8 @@ hb_icu_get_unicode_funcs (void) if (!hb_atomic_ptr_get (&normalizer)) { UErrorCode icu_err = U_ZERO_ERROR; /* We ignore failure in getNFCInstace(). */ - hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err)); + (void) hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err)); } #endif return const_cast (&_hb_icu_unicode_funcs); } - - diff --git a/src/hb-mutex-private.hh b/src/hb-mutex-private.hh index 6281201..a8ea39c 100644 --- a/src/hb-mutex-private.hh +++ b/src/hb-mutex-private.hh @@ -47,7 +47,11 @@ #include typedef CRITICAL_SECTION hb_mutex_impl_t; #define HB_MUTEX_IMPL_INIT {0} +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) +#define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0) +#else #define hb_mutex_impl_init(M) InitializeCriticalSection (M) +#endif #define hb_mutex_impl_lock(M) EnterCriticalSection (M) #define hb_mutex_impl_unlock(M) LeaveCriticalSection (M) #define hb_mutex_impl_finish(M) DeleteCriticalSection (M) diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh index 8a9ae34..7bd0f16 100644 --- a/src/hb-object-private.hh +++ b/src/hb-object-private.hh @@ -68,8 +68,6 @@ struct hb_reference_count_t #define HB_USER_DATA_ARRAY_INIT {HB_MUTEX_INIT, HB_LOCKABLE_SET_INIT} struct hb_user_data_array_t { - /* TODO Add tracing. */ - struct hb_user_data_item_t { hb_user_data_key_t *key; void *data; @@ -106,69 +104,6 @@ struct hb_object_header_t #define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INVALID, HB_USER_DATA_ARRAY_INIT} - static inline void *create (unsigned int size) { - hb_object_header_t *obj = (hb_object_header_t *) calloc (1, size); - - if (likely (obj)) - obj->init (); - - return obj; - } - - inline void init (void) { - ref_count.init (1); - user_data.init (); - } - - inline bool is_inert (void) const { - return unlikely (ref_count.is_invalid ()); - } - - inline void reference (void) { - if (unlikely (!this || this->is_inert ())) - return; - ref_count.inc (); - } - - inline bool destroy (void) { - if (unlikely (!this || this->is_inert ())) - return false; - if (ref_count.dec () != 1) - return false; - - ref_count.finish (); /* Do this before user_data */ - user_data.finish (); - - return true; - } - - inline bool set_user_data (hb_user_data_key_t *key, - void * data, - hb_destroy_func_t destroy_func, - hb_bool_t replace) { - if (unlikely (!this || this->is_inert ())) - return false; - - return user_data.set (key, data, destroy_func, replace); - } - - inline void *get_user_data (hb_user_data_key_t *key) { - if (unlikely (!this || this->is_inert ())) - return NULL; - - return user_data.get (key); - } - - inline void trace (const char *function) const { - if (unlikely (!this)) return; - /* TODO We cannot use DEBUG_MSG_FUNC here since that one currently only - * prints the class name and throws away the template info. */ - DEBUG_MSG (OBJECT, (void *) this, - "%s refcount=%d", - function, - this ? ref_count.ref_count : 0); - } - private: ASSERT_POD (); }; @@ -179,32 +114,56 @@ struct hb_object_header_t template static inline void hb_object_trace (const Type *obj, const char *function) { - obj->header.trace (function); + DEBUG_MSG (OBJECT, (void *) obj, + "%s refcount=%d", + function, + obj ? obj->header.ref_count.ref_count : 0); } + template static inline Type *hb_object_create (void) { - Type *obj = (Type *) hb_object_header_t::create (sizeof (Type)); + Type *obj = (Type *) calloc (1, sizeof (Type)); + + if (unlikely (!obj)) + return obj; + + hb_object_init (obj); hb_object_trace (obj, HB_FUNC); return obj; } template +static inline void hb_object_init (Type *obj) +{ + obj->header.ref_count.init (1); + obj->header.user_data.init (); +} +template static inline bool hb_object_is_inert (const Type *obj) { - return unlikely (obj->header.is_inert ()); + return unlikely (obj->header.ref_count.is_invalid ()); } template static inline Type *hb_object_reference (Type *obj) { hb_object_trace (obj, HB_FUNC); - obj->header.reference (); + if (unlikely (!obj || hb_object_is_inert (obj))) + return obj; + obj->header.ref_count.inc (); return obj; } template static inline bool hb_object_destroy (Type *obj) { hb_object_trace (obj, HB_FUNC); - return obj->header.destroy (); + if (unlikely (!obj || hb_object_is_inert (obj))) + return false; + if (obj->header.ref_count.dec () != 1) + return false; + + obj->header.ref_count.finish (); /* Do this before user_data */ + obj->header.user_data.finish (); + return true; } template static inline bool hb_object_set_user_data (Type *obj, @@ -213,14 +172,18 @@ static inline bool hb_object_set_user_data (Type *obj, hb_destroy_func_t destroy, hb_bool_t replace) { - return obj->header.set_user_data (key, data, destroy, replace); + if (unlikely (!obj || hb_object_is_inert (obj))) + return false; + return obj->header.user_data.set (key, data, destroy, replace); } template static inline void *hb_object_get_user_data (Type *obj, hb_user_data_key_t *key) { - return obj->header.get_user_data (key); + if (unlikely (!obj || hb_object_is_inert (obj))) + return NULL; + return obj->header.user_data.get (key); } diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh index 57db59d..178bc7c 100644 --- a/src/hb-open-file-private.hh +++ b/src/hb-open-file-private.hh @@ -53,7 +53,8 @@ struct TTCHeader; typedef struct TableRecord { - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this)); } @@ -102,7 +103,8 @@ typedef struct OffsetTable } public: - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && c->check_array (tables, TableRecord::static_size, numTables)); } @@ -130,7 +132,8 @@ struct TTCHeaderVersion1 inline unsigned int get_face_count (void) const { return table.len; } inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+table[i]; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (table.sanitize (c, this)); } @@ -169,7 +172,8 @@ struct TTCHeader } } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); if (unlikely (!u.header.version.sanitize (c))) return TRACE_RETURN (false); switch (u.header.version.major) { @@ -197,6 +201,8 @@ struct TTCHeader struct OpenTypeFontFile { + static const hb_tag_t tableTag = HB_TAG ('_','_','_','_'); /* Sanitizer needs this. */ + static const hb_tag_t CFFTag = HB_TAG ('O','T','T','O'); /* OpenType with Postscript outlines */ static const hb_tag_t TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 ); /* OpenType with TrueType outlines */ static const hb_tag_t TTCTag = HB_TAG ('t','t','c','f'); /* TrueType Collection */ @@ -231,7 +237,8 @@ struct OpenTypeFontFile } } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); if (unlikely (!u.tag.sanitize (c))) return TRACE_RETURN (false); switch (u.tag) { diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 475187b..75a0f56 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -179,10 +179,13 @@ struct hb_sanitize_context_t inline const char *get_name (void) { return "SANITIZE"; } static const unsigned int max_debug_depth = HB_DEBUG_SANITIZE; typedef bool return_t; + template + inline bool may_dispatch (const T *obj, const F *format) + { return format->sanitize (this); } template inline return_t dispatch (const T &obj) { return obj.sanitize (this); } static return_t default_return_value (void) { return true; } - bool stop_sublookup_iteration (const return_t r HB_UNUSED) const { return false; } + bool stop_sublookup_iteration (const return_t r) const { return !r; } inline void init (hb_blob_t *b) { @@ -194,10 +197,11 @@ struct hb_sanitize_context_t { this->start = hb_blob_get_data (this->blob, NULL); this->end = this->start + hb_blob_get_length (this->blob); + assert (this->start <= this->end); /* Must not overflow. */ this->edit_count = 0; this->debug_depth = 0; - DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, +1, + DEBUG_MSG_LEVEL (SANITIZE, start, 0, +1, "start [%p..%p] (%lu bytes)", this->start, this->end, (unsigned long) (this->end - this->start)); @@ -205,7 +209,7 @@ struct hb_sanitize_context_t inline void end_processing (void) { - DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, -1, + DEBUG_MSG_LEVEL (SANITIZE, this->start, 0, -1, "end [%p..%p] %u edit requests", this->start, this->end, this->edit_count); @@ -217,28 +221,31 @@ struct hb_sanitize_context_t inline bool check_range (const void *base, unsigned int len) const { const char *p = (const char *) base; + bool ok = this->start <= p && p <= this->end && (unsigned int) (this->end - p) >= len; - hb_auto_trace_t trace - (&this->debug_depth, "SANITIZE", this->blob, NULL, - "check_range [%p..%p] (%d bytes) in [%p..%p]", + DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, + "check_range [%p..%p] (%d bytes) in [%p..%p] -> %s", p, p + len, len, - this->start, this->end); + this->start, this->end, + ok ? "OK" : "OUT-OF-RANGE"); - return TRACE_RETURN (likely (this->start <= p && p <= this->end && (unsigned int) (this->end - p) >= len)); + return likely (ok); } inline bool check_array (const void *base, unsigned int record_size, unsigned int len) const { const char *p = (const char *) base; bool overflows = _hb_unsigned_int_mul_overflows (len, record_size); + unsigned int array_size = record_size * len; + bool ok = !overflows && this->check_range (base, array_size); - hb_auto_trace_t trace - (&this->debug_depth, "SANITIZE", this->blob, NULL, - "check_array [%p..%p] (%d*%d=%ld bytes) in [%p..%p]", - p, p + (record_size * len), record_size, len, (unsigned long) record_size * len, - this->start, this->end); + DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, + "check_array [%p..%p] (%d*%d=%d bytes) in [%p..%p] -> %s", + p, p + (record_size * len), record_size, len, (unsigned int) array_size, + this->start, this->end, + overflows ? "OVERFLOWS" : ok ? "OK" : "OUT-OF-RANGE"); - return TRACE_RETURN (likely (!overflows && this->check_range (base, record_size * len))); + return likely (ok); } template @@ -255,21 +262,20 @@ struct hb_sanitize_context_t const char *p = (const char *) base; this->edit_count++; - hb_auto_trace_t trace - (&this->debug_depth, "SANITIZE", this->blob, NULL, + DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, "may_edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s", this->edit_count, p, p + len, len, this->start, this->end, this->writable ? "GRANTED" : "DENIED"); - return TRACE_RETURN (this->writable); + return this->writable; } template - inline bool try_set (Type *obj, const ValueType &v) { + inline bool try_set (const Type *obj, const ValueType &v) { if (this->may_edit (obj, obj->static_size)) { - obj->set (v); + const_cast (obj)->set (v); return true; } return false; @@ -297,7 +303,7 @@ struct Sanitizer c->init (blob); retry: - DEBUG_MSG_FUNC (SANITIZE, blob, "start"); + DEBUG_MSG_FUNC (SANITIZE, c->start, "start"); c->start_processing (); @@ -311,13 +317,13 @@ struct Sanitizer sane = t->sanitize (c); if (sane) { if (c->edit_count) { - DEBUG_MSG_FUNC (SANITIZE, blob, "passed first round with %d edits; going for second round", c->edit_count); + DEBUG_MSG_FUNC (SANITIZE, c->start, "passed first round with %d edits; going for second round", c->edit_count); /* sanitize again to ensure no toe-stepping */ c->edit_count = 0; sane = t->sanitize (c); if (c->edit_count) { - DEBUG_MSG_FUNC (SANITIZE, blob, "requested %d edits in second round; FAILLING", c->edit_count); + DEBUG_MSG_FUNC (SANITIZE, c->start, "requested %d edits in second round; FAILLING", c->edit_count); sane = false; } } @@ -330,7 +336,7 @@ struct Sanitizer if (c->start) { c->writable = true; /* ok, we made it writable by relocating. try again */ - DEBUG_MSG_FUNC (SANITIZE, blob, "retry"); + DEBUG_MSG_FUNC (SANITIZE, c->start, "retry"); goto retry; } } @@ -338,7 +344,7 @@ struct Sanitizer c->end_processing (); - DEBUG_MSG_FUNC (SANITIZE, blob, sane ? "PASSED" : "FAILED"); + DEBUG_MSG_FUNC (SANITIZE, c->start, sane ? "PASSED" : "FAILED"); if (sane) return blob; else { @@ -533,31 +539,55 @@ template struct BEInt { public: - inline void set (Type i) { hb_be_uint16_put (v,i); } - inline operator Type (void) const { return hb_be_uint16_get (v); } - inline bool operator == (const BEInt& o) const { return hb_be_uint16_eq (v, o.v); } - inline bool operator != (const BEInt& o) const { return !(*this == o); } + inline void set (Type V) + { + v[0] = (V >> 8) & 0xFF; + v[1] = (V ) & 0xFF; + } + inline operator Type (void) const + { + return (v[0] << 8) + + (v[1] ); + } private: uint8_t v[2]; }; template -struct BEInt +struct BEInt { public: - inline void set (Type i) { hb_be_uint32_put (v,i); } - inline operator Type (void) const { return hb_be_uint32_get (v); } - inline bool operator == (const BEInt& o) const { return hb_be_uint32_eq (v, o.v); } - inline bool operator != (const BEInt& o) const { return !(*this == o); } - private: uint8_t v[4]; + inline void set (Type V) + { + v[0] = (V >> 16) & 0xFF; + v[1] = (V >> 8) & 0xFF; + v[2] = (V ) & 0xFF; + } + inline operator Type (void) const + { + return (v[0] << 16) + + (v[1] << 8) + + (v[2] ); + } + private: uint8_t v[3]; }; template -struct BEInt +struct BEInt { public: - inline void set (Type i) { hb_be_uint24_put (v,i); } - inline operator Type (void) const { return hb_be_uint24_get (v); } - inline bool operator == (const BEInt& o) const { return hb_be_uint24_eq (v, o.v); } - inline bool operator != (const BEInt& o) const { return !(*this == o); } - private: uint8_t v[3]; + inline void set (Type V) + { + v[0] = (V >> 24) & 0xFF; + v[1] = (V >> 16) & 0xFF; + v[2] = (V >> 8) & 0xFF; + v[3] = (V ) & 0xFF; + } + inline operator Type (void) const + { + return (v[0] << 24) + + (v[1] << 16) + + (v[2] << 8) + + (v[3] ); + } + private: uint8_t v[4]; }; /* Integer types in big-endian order and no alignment requirement */ @@ -566,12 +596,19 @@ struct IntType { inline void set (Type i) { v.set (i); } inline operator Type(void) const { return v; } - inline bool operator == (const IntType &o) const { return v == o.v; } - inline bool operator != (const IntType &o) const { return v != o.v; } + inline bool operator == (const IntType &o) const { return (Type) v == (Type) o.v; } + inline bool operator != (const IntType &o) const { return !(*this == o); } static inline int cmp (const IntType *a, const IntType *b) { return b->cmp (*a); } - inline int cmp (IntType va) const { Type a = va; Type b = v; return a < b ? -1 : a == b ? 0 : +1; } - inline int cmp (Type a) const { Type b = v; return a < b ? -1 : a == b ? 0 : +1; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline int cmp (Type a) const + { + Type b = v; + if (sizeof (Type) < sizeof (int)) + return (int) a - (int) b; + else + return a < b ? -1 : a == b ? 0 : +1; + } + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (likely (c->check_struct (this))); } @@ -598,7 +635,8 @@ typedef USHORT UFWORD; * 1904. The value is represented as a signed 64-bit integer. */ struct LONGDATETIME { - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (likely (c->check_struct (this))); } @@ -622,7 +660,10 @@ struct Tag : ULONG DEFINE_NULL_DATA (Tag, " "); /* Glyph index number, same as uint16 (length = 16 bits) */ -typedef USHORT GlyphID; +struct GlyphID : USHORT { + static inline int cmp (const GlyphID *a, const GlyphID *b) { return b->USHORT::cmp (*a); } + inline int cmp (hb_codepoint_t a) const { return (int) a - (int) *this; } +}; /* Script/language-system/feature index */ struct Index : USHORT { @@ -671,7 +712,8 @@ struct FixedVersion { inline uint32_t to_int (void) const { return (major << 16) + minor; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this)); } @@ -699,33 +741,35 @@ struct OffsetTo : Offset return StructAtOffset (base, offset); } - inline Type& serialize (hb_serialize_context_t *c, void *base) + inline Type& serialize (hb_serialize_context_t *c, const void *base) { Type *t = c->start_embed (); this->set ((char *) t - (char *) base); /* TODO(serialize) Overflow? */ return *t; } - inline bool sanitize (hb_sanitize_context_t *c, void *base) { + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return TRACE_RETURN (false); unsigned int offset = *this; if (unlikely (!offset)) return TRACE_RETURN (true); - Type &obj = StructAtOffset (base, offset); + const Type &obj = StructAtOffset (base, offset); return TRACE_RETURN (likely (obj.sanitize (c)) || neuter (c)); } template - inline bool sanitize (hb_sanitize_context_t *c, void *base, T user_data) { + inline bool sanitize (hb_sanitize_context_t *c, const void *base, T user_data) const + { TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return TRACE_RETURN (false); unsigned int offset = *this; if (unlikely (!offset)) return TRACE_RETURN (true); - Type &obj = StructAtOffset (base, offset); + const Type &obj = StructAtOffset (base, offset); return TRACE_RETURN (likely (obj.sanitize (c, user_data)) || neuter (c)); } /* Set the offset to Null */ - inline bool neuter (hb_sanitize_context_t *c) { + inline bool neuter (hb_sanitize_context_t *c) const { return c->try_set (this, 0); } DEFINE_SIZE_STATIC (sizeof(OffsetType)); @@ -790,7 +834,8 @@ struct ArrayOf return TRACE_RETURN (true); } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false); @@ -805,7 +850,8 @@ struct ArrayOf return TRACE_RETURN (true); } - inline bool sanitize (hb_sanitize_context_t *c, void *base) { + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false); unsigned int count = len; @@ -815,7 +861,8 @@ struct ArrayOf return TRACE_RETURN (true); } template - inline bool sanitize (hb_sanitize_context_t *c, void *base, T user_data) { + inline bool sanitize (hb_sanitize_context_t *c, const void *base, T user_data) const + { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false); unsigned int count = len; @@ -836,7 +883,8 @@ struct ArrayOf } private: - inline bool sanitize_shallow (hb_sanitize_context_t *c) { + inline bool sanitize_shallow (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && c->check_array (this, Type::static_size, len)); } @@ -862,12 +910,14 @@ struct OffsetListOf : OffsetArrayOf return this+this->array[i]; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (OffsetArrayOf::sanitize (c, this)); } template - inline bool sanitize (hb_sanitize_context_t *c, T user_data) { + inline bool sanitize (hb_sanitize_context_t *c, T user_data) const + { TRACE_SANITIZE (this); return TRACE_RETURN (OffsetArrayOf::sanitize (c, this, user_data)); } @@ -901,12 +951,14 @@ struct HeadlessArrayOf return TRACE_RETURN (true); } - inline bool sanitize_shallow (hb_sanitize_context_t *c) { + inline bool sanitize_shallow (hb_sanitize_context_t *c) const + { return c->check_struct (this) && c->check_array (this, Type::static_size, len); } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false); diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index d531411..0482312 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -51,7 +51,8 @@ struct CmapSubtableFormat0 return true; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this)); } @@ -125,7 +126,7 @@ struct CmapSubtableFormat4 return true; } - inline bool sanitize (hb_sanitize_context_t *c) + inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) @@ -183,7 +184,8 @@ struct CmapSubtableLongGroup return 0; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this)); } @@ -210,7 +212,8 @@ struct CmapSubtableTrimmed return true; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && glyphIdArray.sanitize (c)); } @@ -242,7 +245,8 @@ struct CmapSubtableLongSegmented return true; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && groups.sanitize (c)); } @@ -288,7 +292,8 @@ struct UnicodeValueRange return 0; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this)); } @@ -309,7 +314,8 @@ struct UVSMapping return unicodeValue.cmp (codepoint); } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this)); } @@ -348,7 +354,8 @@ struct VariationSelectorRecord return varSelector.cmp (variation_selector); } - inline bool sanitize (hb_sanitize_context_t *c, void *base) { + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && defaultUVS.sanitize (c, base) && @@ -373,7 +380,8 @@ struct CmapSubtableFormat14 return record[record.bsearch(variation_selector)].get_glyph (codepoint, glyph, this); } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && record.sanitize (c, this)); @@ -418,7 +426,8 @@ struct CmapSubtable } } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return TRACE_RETURN (false); switch (u.format) { @@ -461,7 +470,8 @@ struct EncodingRecord return 0; } - inline bool sanitize (hb_sanitize_context_t *c, void *base) { + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && subtable.sanitize (c, base)); @@ -496,7 +506,8 @@ struct cmap return &(this+encodingRecord[result].subtable); } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && likely (version == 0) && diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index c9890c5..2af2f54 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -35,17 +35,128 @@ #include "hb-ot-hmtx-table.hh" +struct hb_ot_face_metrics_accelerator_t +{ + unsigned int num_metrics; + unsigned int num_advances; + unsigned int default_advance; + const OT::_mtx *table; + hb_blob_t *blob; + + inline void init (hb_face_t *face, + hb_tag_t _hea_tag, hb_tag_t _mtx_tag, + unsigned int default_advance) + { + this->default_advance = default_advance; + this->num_metrics = face->get_num_glyphs (); + + hb_blob_t *_hea_blob = OT::Sanitizer::sanitize (face->reference_table (_hea_tag)); + const OT::_hea *_hea = OT::Sanitizer::lock_instance (_hea_blob); + this->num_advances = _hea->numberOfLongMetrics; + hb_blob_destroy (_hea_blob); + + this->blob = OT::Sanitizer::sanitize (face->reference_table (_mtx_tag)); + if (unlikely (!this->num_advances || + 2 * (this->num_advances + this->num_metrics) < hb_blob_get_length (this->blob))) + { + this->num_metrics = this->num_advances = 0; + hb_blob_destroy (this->blob); + this->blob = hb_blob_get_empty (); + } + this->table = OT::Sanitizer::lock_instance (this->blob); + } + + inline void fini (void) + { + hb_blob_destroy (this->blob); + } + + inline unsigned int get_advance (hb_codepoint_t glyph) const + { + if (unlikely (glyph >= this->num_metrics)) + { + /* If this->num_metrics is zero, it means we don't have the metrics table + * for this direction: return one EM. Otherwise, it means that the glyph + * index is out of bound: return zero. */ + if (this->num_metrics) + return 0; + else + return this->default_advance; + } + + if (glyph >= this->num_advances) + glyph = this->num_advances - 1; + + return this->table->longMetric[glyph].advance; + } +}; + +struct hb_ot_face_cmap_accelerator_t +{ + const OT::CmapSubtable *table; + const OT::CmapSubtable *uvs_table; + hb_blob_t *blob; + + inline void init (hb_face_t *face) + { + this->blob = OT::Sanitizer::sanitize (face->reference_table (HB_OT_TAG_cmap)); + const OT::cmap *cmap = OT::Sanitizer::lock_instance (this->blob); + const OT::CmapSubtable *subtable = NULL; + const OT::CmapSubtable *subtable_uvs = NULL; + + /* 32-bit subtables. */ + if (!subtable) subtable = cmap->find_subtable (3, 10); + if (!subtable) subtable = cmap->find_subtable (0, 6); + if (!subtable) subtable = cmap->find_subtable (0, 4); + /* 16-bit subtables. */ + if (!subtable) subtable = cmap->find_subtable (3, 1); + if (!subtable) subtable = cmap->find_subtable (0, 3); + if (!subtable) subtable = cmap->find_subtable (0, 2); + if (!subtable) subtable = cmap->find_subtable (0, 1); + if (!subtable) subtable = cmap->find_subtable (0, 0); + /* Meh. */ + if (!subtable) subtable = &OT::Null(OT::CmapSubtable); + + /* UVS subtable. */ + if (!subtable_uvs) subtable_uvs = cmap->find_subtable (0, 5); + /* Meh. */ + if (!subtable_uvs) subtable_uvs = &OT::Null(OT::CmapSubtable); + + this->table = subtable; + this->uvs_table = subtable_uvs; + } + + inline void fini (void) + { + hb_blob_destroy (this->blob); + } + + inline bool get_glyph (hb_codepoint_t unicode, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) const + { + if (unlikely (variation_selector)) + { + switch (this->uvs_table->get_glyph_variant (unicode, + variation_selector, + glyph)) + { + case OT::GLYPH_VARIANT_NOT_FOUND: return false; + case OT::GLYPH_VARIANT_FOUND: return true; + case OT::GLYPH_VARIANT_USE_DEFAULT: break; + } + } + + return this->table->get_glyph (unicode, glyph); + } +}; + struct hb_ot_font_t { - unsigned int num_glyphs; - unsigned int num_hmetrics; - const OT::hmtx *hmtx; - hb_blob_t *hmtx_blob; - - const OT::CmapSubtable *cmap; - const OT::CmapSubtable *cmap_uvs; - hb_blob_t *cmap_blob; + hb_ot_face_cmap_accelerator_t cmap; + hb_ot_face_metrics_accelerator_t h_metrics; + hb_ot_face_metrics_accelerator_t v_metrics; }; @@ -53,50 +164,16 @@ static hb_ot_font_t * _hb_ot_font_create (hb_font_t *font) { hb_ot_font_t *ot_font = (hb_ot_font_t *) calloc (1, sizeof (hb_ot_font_t)); + hb_face_t *face = font->face; if (unlikely (!ot_font)) return NULL; - ot_font->num_glyphs = font->face->get_num_glyphs (); + unsigned int upem = face->get_upem (); - { - hb_blob_t *hhea_blob = OT::Sanitizer::sanitize (font->face->reference_table (HB_OT_TAG_hhea)); - const OT::hhea *hhea = OT::Sanitizer::lock_instance (hhea_blob); - ot_font->num_hmetrics = hhea->numberOfHMetrics; - hb_blob_destroy (hhea_blob); - } - ot_font->hmtx_blob = OT::Sanitizer::sanitize (font->face->reference_table (HB_OT_TAG_hmtx)); - if (unlikely (!ot_font->num_hmetrics || - 2 * (ot_font->num_hmetrics + ot_font->num_glyphs) < hb_blob_get_length (ot_font->hmtx_blob))) - { - hb_blob_destroy (ot_font->hmtx_blob); - free (ot_font); - return NULL; - } - ot_font->hmtx = OT::Sanitizer::lock_instance (ot_font->hmtx_blob); - - ot_font->cmap_blob = OT::Sanitizer::sanitize (font->face->reference_table (HB_OT_TAG_cmap)); - const OT::cmap *cmap = OT::Sanitizer::lock_instance (ot_font->cmap_blob); - const OT::CmapSubtable *subtable = NULL; - const OT::CmapSubtable *subtable_uvs = NULL; - - /* 32-bit subtables. */ - if (!subtable) subtable = cmap->find_subtable (0, 6); - if (!subtable) subtable = cmap->find_subtable (0, 4); - if (!subtable) subtable = cmap->find_subtable (3, 10); - /* 16-bit subtables. */ - if (!subtable) subtable = cmap->find_subtable (0, 3); - if (!subtable) subtable = cmap->find_subtable (3, 1); - /* Meh. */ - if (!subtable) subtable = &OT::Null(OT::CmapSubtable); - - /* UVS subtable. */ - if (!subtable_uvs) subtable_uvs = cmap->find_subtable (0, 5); - /* Meh. */ - if (!subtable_uvs) subtable_uvs = &OT::Null(OT::CmapSubtable); - - ot_font->cmap = subtable; - ot_font->cmap_uvs = subtable_uvs; + ot_font->cmap.init (face); + ot_font->h_metrics.init (face, HB_OT_TAG_hhea, HB_OT_TAG_hmtx, upem>>1); + ot_font->v_metrics.init (face, HB_OT_TAG_vhea, HB_OT_TAG_vmtx, upem); /* TODO Can we do this lazily? */ return ot_font; } @@ -104,8 +181,9 @@ _hb_ot_font_create (hb_font_t *font) static void _hb_ot_font_destroy (hb_ot_font_t *ot_font) { - hb_blob_destroy (ot_font->cmap_blob); - hb_blob_destroy (ot_font->hmtx_blob); + ot_font->cmap.fini (); + ot_font->h_metrics.fini (); + ot_font->v_metrics.fini (); free (ot_font); } @@ -121,20 +199,7 @@ hb_ot_get_glyph (hb_font_t *font HB_UNUSED, { const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; - - if (unlikely (variation_selector)) - { - switch (ot_font->cmap_uvs->get_glyph_variant (unicode, - variation_selector, - glyph)) - { - case OT::GLYPH_VARIANT_NOT_FOUND: return false; - case OT::GLYPH_VARIANT_FOUND: return true; - case OT::GLYPH_VARIANT_USE_DEFAULT: break; - } - } - - return ot_font->cmap->get_glyph (unicode, glyph); + return ot_font->cmap.get_glyph (unicode, variation_selector, glyph); } static hb_position_t @@ -144,14 +209,7 @@ hb_ot_get_glyph_h_advance (hb_font_t *font HB_UNUSED, void *user_data HB_UNUSED) { const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; - - if (unlikely (glyph >= ot_font->num_glyphs)) - return 0; /* Maybe better to return notdef's advance instead? */ - - if (glyph >= ot_font->num_hmetrics) - glyph = ot_font->num_hmetrics - 1; - - return font->em_scale_x (ot_font->hmtx->longHorMetric[glyph].advanceWidth); + return font->em_scale_x (ot_font->h_metrics.get_advance (glyph)); } static hb_position_t @@ -160,8 +218,8 @@ hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED, hb_codepoint_t glyph, void *user_data HB_UNUSED) { - /* TODO */ - return 0; + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; + return font->em_scale_y (-ot_font->v_metrics.get_advance (glyph)); } static hb_bool_t @@ -206,6 +264,7 @@ hb_ot_get_glyph_v_kerning (hb_font_t *font HB_UNUSED, hb_codepoint_t bottom_glyph HB_UNUSED, void *user_data HB_UNUSED) { + /* OpenType doesn't have vertical-kerning other than GPOS. */ return 0; } diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh index ec4e8c9..268f133 100644 --- a/src/hb-ot-head-table.hh +++ b/src/hb-ot-head-table.hh @@ -45,13 +45,15 @@ struct head { static const hb_tag_t tableTag = HB_OT_TAG_head; - inline unsigned int get_upem (void) const { + inline unsigned int get_upem (void) const + { unsigned int upem = unitsPerEm; /* If no valid head table found, assume 1000, which matches typical Type1 usage. */ return 16 <= upem && upem <= 16384 ? upem : 1000; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); } diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh index d433200..992fe55 100644 --- a/src/hb-ot-hhea-table.hh +++ b/src/hb-ot-hhea-table.hh @@ -35,61 +35,67 @@ namespace OT { /* * hhea -- The Horizontal Header Table + * vhea -- The Vertical Header Table */ #define HB_OT_TAG_hhea HB_TAG('h','h','e','a') +#define HB_OT_TAG_vhea HB_TAG('v','h','e','a') -struct hhea +struct _hea { - static const hb_tag_t tableTag = HB_OT_TAG_hhea; + static const hb_tag_t tableTag = HB_TAG('_','h','e','a'); + + static const hb_tag_t hheaTag = HB_OT_TAG_hhea; + static const hb_tag_t vheaTag = HB_OT_TAG_vhea; - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); } public: FixedVersion version; /* 0x00010000u for version 1.0. */ - FWORD ascender; /* Typographic ascent. - * (Distance from baseline of highest - * ascender) */ - FWORD descender; /* Typographic descent. - * (Distance from baseline of lowest - * descender) */ - FWORD lineGap; /* Typographic line gap. Negative - * LineGap values are treated as zero - * in Windows 3.1, System 6, and - * System 7. */ - UFWORD advanceWidthMax; /* Maximum advance width value in - * 'hmtx' table. */ - FWORD minLeftSideBearing; /* Minimum left sidebearing value in - * 'hmtx' table. */ - FWORD minRightSideBearing; /* Minimum right sidebearing value; + FWORD ascender; /* Typographic ascent. */ + FWORD descender; /* Typographic descent. */ + FWORD lineGap; /* Typographic line gap. */ + UFWORD advanceMax; /* Maximum advance width/height value in + * metrics table. */ + FWORD minLeadingBearing; /* Minimum left/top sidebearing value in + * metrics table. */ + FWORD minTrailingBearing; /* Minimum right/bottom sidebearing value; * calculated as Min(aw - lsb - - * (xMax - xMin)). */ - FWORD xMaxExtent; /* Max(lsb + (xMax - xMin)). */ + * (xMax - xMin)) for horizontal. */ + FWORD maxExtent; /* horizontal: Max(lsb + (xMax - xMin)), + * vertical: minLeadingBearing+(yMax-yMin). */ SHORT caretSlopeRise; /* Used to calculate the slope of the - * cursor (rise/run); 1 for vertical. */ - SHORT caretSlopeRun; /* 0 for vertical. */ + * cursor (rise/run); 1 for vertical caret, + * 0 for horizontal.*/ + SHORT caretSlopeRun; /* 0 for vertical caret, 1 for horizontal. */ SHORT caretOffset; /* The amount by which a slanted * highlight on a glyph needs * to be shifted to produce the * best appearance. Set to 0 for - * non--slanted fonts */ - SHORT reserved1; /* set to 0 */ - SHORT reserved2; /* set to 0 */ - SHORT reserved3; /* set to 0 */ - SHORT reserved4; /* set to 0 */ + * non-slanted fonts. */ + SHORT reserved1; /* Set to 0. */ + SHORT reserved2; /* Set to 0. */ + SHORT reserved3; /* Set to 0. */ + SHORT reserved4; /* Set to 0. */ SHORT metricDataFormat; /* 0 for current format. */ - USHORT numberOfHMetrics; /* Number of hMetric entries in 'hmtx' - * table */ + USHORT numberOfLongMetrics; /* Number of LongMetric entries in metric + * table. */ public: DEFINE_SIZE_STATIC (36); }; +struct hhea : _hea { + static const hb_tag_t tableTag = HB_OT_TAG_hhea; +}; +struct vhea : _hea { + static const hb_tag_t tableTag = HB_OT_TAG_vhea; +}; + } /* namespace OT */ diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index e918e3b..a0e3855 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -35,24 +35,30 @@ namespace OT { /* * hmtx -- The Horizontal Metrics Table + * vmtx -- The Vertical Metrics Table */ #define HB_OT_TAG_hmtx HB_TAG('h','m','t','x') +#define HB_OT_TAG_vmtx HB_TAG('v','m','t','x') -struct LongHorMetric +struct LongMetric { - USHORT advanceWidth; - SHORT lsb; + USHORT advance; /* Advance width/height. */ + SHORT lsb; /* Leading (left/top) side bearing. */ public: DEFINE_SIZE_STATIC (4); }; -struct hmtx +struct _mtx { - static const hb_tag_t tableTag = HB_OT_TAG_hmtx; + static const hb_tag_t tableTag = HB_TAG('_','m','t','x'); + + static const hb_tag_t hmtxTag = HB_OT_TAG_hmtx; + static const hb_tag_t vmtxTag = HB_OT_TAG_vmtx; - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); /* We don't check for anything specific here. The users of the * struct do all the hard work... */ @@ -60,7 +66,7 @@ struct hmtx } public: - LongHorMetric longHorMetric[VAR]; /* Paired advance width and left side + LongMetric longMetric[VAR]; /* Paired advance width and leading * bearing values for each glyph. The * value numOfHMetrics comes from * the 'hhea' table. If the font is @@ -68,23 +74,29 @@ struct hmtx * be in the array, but that entry is * required. The last entry applies to * all subsequent glyphs. */ - SHORT leftSideBearingX[VAR]; /* Here the advanceWidth is assumed - * to be the same as the advanceWidth + SHORT leadingBearingX[VAR]; /* Here the advance is assumed + * to be the same as the advance * for the last entry above. The * number of entries in this array is * derived from numGlyphs (from 'maxp' - * table) minus numberOfHMetrics. This - * generally is used with a run of - * monospaced glyphs (e.g., Kanji + * table) minus numberOfLongMetrics. + * This generally is used with a run + * of monospaced glyphs (e.g., Kanji * fonts or Courier fonts). Only one * run is allowed and it must be at * the end. This allows a monospaced - * font to vary the left side bearing + * font to vary the side bearing * values for each glyph. */ public: - DEFINE_SIZE_ARRAY2 (0, longHorMetric, leftSideBearingX); + DEFINE_SIZE_ARRAY2 (0, longMetric, leadingBearingX); }; +struct hmtx : _mtx { + static const hb_tag_t tableTag = HB_OT_TAG_hmtx; +}; +struct vmtx : _mtx { + static const hb_tag_t tableTag = HB_OT_TAG_vmtx; +}; } /* namespace OT */ diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index abd063c..3db7f57 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -37,6 +37,12 @@ namespace OT { +#define TRACE_DISPATCH(this, format) \ + hb_auto_trace_t trace \ + (&c->debug_depth, c->get_name (), this, HB_FUNC, \ + "format %d", (int) format); + + #define NOT_COVERED ((unsigned int) -1) #define MAX_NESTING_LEVEL 8 #define MAX_CONTEXT_LENGTH 64 @@ -63,9 +69,10 @@ struct Record struct sanitize_closure_t { hb_tag_t tag; - void *list_base; + const void *list_base; }; - inline bool sanitize (hb_sanitize_context_t *c, void *base) { + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { TRACE_SANITIZE (this); const sanitize_closure_t closure = {tag, base}; return TRACE_RETURN (c->check_struct (this) && offset.sanitize (c, base, &closure)); @@ -121,7 +128,8 @@ struct RecordListOf : RecordArrayOf inline const Type& operator [] (unsigned int i) const { return this+RecordArrayOf::operator [](i).offset; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (RecordArrayOf::sanitize (c, this)); } @@ -134,7 +142,8 @@ struct RangeRecord return g < start ? -1 : g <= end ? 0 : +1 ; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this)); } @@ -199,7 +208,8 @@ struct LangSys } inline bool sanitize (hb_sanitize_context_t *c, - const Record::sanitize_closure_t * = NULL) { + const Record::sanitize_closure_t * = NULL) const + { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && featureIndex.sanitize (c)); } @@ -238,7 +248,8 @@ struct Script inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; } inline bool sanitize (hb_sanitize_context_t *c, - const Record