Commit Graph

320 Commits

Author SHA1 Message Date
Behdad Esfahbod 23768a99e0 [config] Replace HAVE_FALLBACK with HB_NO_FALLBACK_SHAPE
This disables fallback shaper in tiny builds.  Projects that don't
use our build system and want to disable fallback shaper (eg. Firefox)
should define HB_NO_FALLBACK_SHAPE now.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-17 20:29:29 -07:00
Behdad Esfahbod 65392b734e [ucdn] Replace UCDN with a new UCD implementation
UCDN was ~120kb of data.  New implementatoin is 69kb in default builds,
and 49kb if built with HB_OPTIMIZE_SIZE or __OPTIMIZE_SIZE__.  The
latter automatically enabled if built with -Os or -Oz.

There's room to shave off another 10kb or 20kb.  That will follow later.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-23 20:34:19 -04:00
Behdad Esfahbod 36dee9221f [gen-ucd] Rename 2019-05-23 20:34:19 -04:00
Behdad Esfahbod 52c15b053a Revert "[ragel] Switch to -T1 output instead of -F1"
This reverts commit ae8719eb59.

Part of https://github.com/harfbuzz/harfbuzz/issues/1708
2019-05-13 14:10:28 -07:00
Behdad Esfahbod ae8719eb59 [ragel] Switch to -T1 output instead of -F1
Fedora upgraded to ragel 7, which is buggy if char is signed.
Switching to -G2 output fails with sign-compare error:

../../src/hb-buffer-deserialize-json.hh:107:12: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘const char’ [-Werror=sign-compare]
    if ( 9u <= ( (*( p))) && ( (*( p))) <= 13u ) {
         ~~~^~~~~~~~~~~~~

Switching to -T1 for now.  It actually results in smaller code,
at the expense of some binary searching instead of flat tables.
In the not distant future, we might actually generate two different
outputs and choose between depending on size-optimize options.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1708
2019-05-13 12:30:40 -07:00
Behdad Esfahbod 70a49f2e4a [meta] Add hb_conditional<> and hb_is_convertible() 2019-05-09 15:24:25 -07:00
Behdad Esfahbod 11ab889a8d Rename a few test programs 2019-04-24 09:55:24 -04:00
Behdad Esfahbod 0d7af5fb02 [algs] Use universal references for hb_pair()
Such that it carries lvalues inside.
2019-02-14 19:37:57 -08:00
Behdad Esfahbod 8e5c2bc60b [Makefile.am] Minor 2018-12-21 17:29:11 -05:00
Behdad Esfahbod e952075248 Minor 2018-12-21 11:15:16 -05:00
Behdad Esfahbod 8001e00a47 [iter] First sample use 2018-12-21 01:53:27 -05:00
Behdad Esfahbod f6d5f1e91c [iter] Add empty test 2018-12-21 00:23:46 -05:00
Behdad Esfahbod 58d4d19947 Simplify build source list 2018-12-01 19:34:18 -05:00
Behdad Esfahbod 44b9331f66 [aat] Fix include issues 2018-11-25 01:16:02 -05:00
Behdad Esfahbod d6666b3866 [fuzzing] Remove limited-edition build of libraries
Use normal, production, shared libraries.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1237
2018-11-12 13:21:14 -05:00
Behdad Esfahbod f9e0552deb [fuzzing] Make "make lib" faster and more usable 2018-11-10 21:06:56 -05:00
Ebrahim Byagowi 7170e35096
Rename deprecated symbols list file name and clean it up (#1328) 2018-10-29 13:11:01 +03:30
Ebrahim Byagowi 9c692e5b8d [test-ot-color] Use public APIs on the tool 2018-10-29 12:22:39 +03:30
Behdad Esfahbod 68f2c832c8 Remove dump-emoji 2018-10-28 18:33:10 -07:00
Behdad Esfahbod 337ea0b717 [fuzzing] Remove HB_NDEBUG
Not sure why it ever was added.
2018-10-26 21:22:26 -07:00
Behdad Esfahbod c442fd9a10 [name] Add src/test-name-table tool to show all font names 2018-10-26 21:22:26 -07:00
Behdad Esfahbod 6d40eb8372 Touch up on previous commit
https://github.com/harfbuzz/harfbuzz/pull/1273
2018-10-23 02:51:42 -07:00
David Corbett 205737acdc [use] Prohibit visually ambiguous vowel sequences 2018-10-23 02:25:08 -07:00
Ebrahim Byagowi 9df2fb1611 Add API tests for hb_map_t 2018-10-19 20:23:36 +03:30
Ebrahim Byagowi c6eb5e852c Don't report deprecated symbols as unused symbols 2018-10-19 20:23:36 +03:30
David Corbett 2f1f961cc0 Autogenerate the BCP 47 to OpenType mappings
The new script, gen-tag-table.py, generates `ot_languages` automatically
from the [OpenType language system tag registry][ot] and the [IANA
Language Subtag Registry][bcp47] with some manual modifications. If an
OpenType tag maps to a BCP 47 macrolanguage, all the macrolanguage's
individual languages are mapped to the same OpenType tag, except for
individual languages with their own OpenType mappings. Deprecated
BCP 47 tags are canonicalized.

[ot]: https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags
[bcp47]: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

Some OpenType tags correspond to multiple ISO 639 codes. The mapping
from ISO 639 codes lists OpenType tags in priority order, such that more
specific or more likely tags appear first.

Some OpenType tags have no corresponding ISO 639 code in the registry so
their mappings use BCP 47 subtags besides the language. For example, any
BCP 47 tag with a fonipa variant subtag is mapped to 'IPPH', and 'IPPH'
is mapped back to und-fonipa.

Other OpenType tags have no corresponding ISO 639 code because it is not
clear what they are for. HarfBuzz just ignores these tags.

One such ignored tag is 'ZHP ' (Chinese Phonetic). It probably means
zh-Latn. However, it is used in Microsoft JhengHei and Microsoft YaHei
with the script tag 'hani', implying that it is not a romanization
scheme after all. It would be simple enough to add this mapping to
gen-tag-table.py once a definitive mapping is determined.

The manual modifications are mainly either obvious mappings that the
OpenType registry omits or mappings for compatibility with previous
versions of HarfBuzz. Some of the old mappings were discarded, though,
for homophonous language names. For example, OpenType maps 'KUI ' to
kxu; previous versions of HarfBuzz also mapped it to kvd, because kvd
and kxu both happen to be called "Kui".

gen-tag-table.py also generates a function to convert multi-subtag tags
like el-polyton and zh-HK to OpenType tags, replacing `ot_languages_zh`
and the hard-coded list of special cases in `hb_ot_tags_from_language`.
It also generates a function to convert OpenType tags to BCP 47,
replacing the hard-coded list of special cases in
`hb_ot_tag_to_language`.
2018-10-11 13:54:28 -04:00
Behdad Esfahbod 1e8fdd285f Remove HAVE_OT
We never tested compiling without it.  Just kill it.  We always build
our own shaper.
2018-10-10 16:32:35 -04:00
Behdad Esfahbod cc126f2817 Minor 2018-10-09 01:10:15 -04:00
Behdad Esfahbod 1e8f195b96 [emoji] Add emoji Extended_Pictographic table and function
Part of https://github.com/harfbuzz/harfbuzz/issues/1159

.
2018-10-03 18:45:27 +02:00
Ebrahim Byagowi 93b65d9fe3
Remove dump-fon (#1100)
It had interesting stuffs like EXE parsing and
big-endian parsers but added in an attempt to find
a solution for #681 which later found not related.
2018-07-17 23:29:16 +04:30
Behdad Esfahbod 019d18e9ae Minor 2018-07-17 11:00:24 +02:00
Cosimo Lupo ccdd156554
src/Makefile.am: pass headers to gen-def.py as arguments, not env vars 2018-07-09 18:26:44 +01:00
Behdad Esfahbod f6893ef82c Move hb-version.h generation to Makefile
Fixes https://github.com/harfbuzz/harfbuzz/issues/864

Unfortunately 1.7.7 and 1.8.0 went out with the wrong hb-version.h contents.
2018-06-12 19:26:15 -04:00
Behdad Esfahbod 105a3b5e2d Minor 2018-06-05 15:31:04 -07:00
Ebrahim Byagowi 67dfb1937b Add dump-fon, a prototype on how to work with .fon/.fnt files (#981) 2018-04-16 11:55:45 +02:00
Ebrahim Byagowi a62554af89
[colr/cpal] Improvements and add a sample renderer (#927) 2018-04-10 00:53:50 +04:30
Behdad Esfahbod 08b8eb678a Another try at fixing linker issue
Fixes https://github.com/harfbuzz/harfbuzz/issues/880
2018-03-31 12:16:57 +02:00
Ebrahim Byagowi cab2c2c08c
Make more gen-* scripts py3 compatible (#940) 2018-03-29 12:48:47 +04:30
Ebrahim Byagowi 8fd55422c3
Implement an internal emojis dumper tool (#909)
Later to be expanded to a more general tool but for now it only supports CBDT, SVG and CBDT.
2018-03-27 16:57:09 +04:30
Ebrahim Byagowi 430f82817d
[ci] Fix coverage build fail (#925) 2018-03-27 13:59:56 +04:30
Behdad Esfahbod 19ec366fb1 Fix previous commit
Automake has this stupid behavior where if your Makefile.am has
syntactic error, it can get to a state that make succeeds but just
ignores broken Makefile.am.  Ouch.
2018-03-26 15:09:54 -07:00
Behdad Esfahbod 44b6c77c64 Try fixing linking again
Before 1.7.5, we were setting -fno-exceptions etc on CXXFLAGS. In 1.7.6
we set it as CPPFLAGS. Try fixing. Also, I'm fairly sure it's safe to
set these unconditionally.

Fixes https://github.com/harfbuzz/harfbuzz/issues/880 (or so I hope)
2018-03-26 14:26:45 -07:00
Ebrahim Byagowi 8d1b4082ae
Appropriate fix for msys2 bot fail on gen-def.py (#894) 2018-03-17 01:05:03 +03:30
Garret Rieger aa9612d35f [subset] Fix fuzzing build for hb-subset-fuzzer. 2018-03-16 09:04:01 -07:00
Garret Rieger 1beb08862e [subset] First pass at setting up a fuzzing program for hb-subset. 2018-03-16 09:04:01 -07:00
Ebrahim Byagowi f7399796a1
Enable coverage test on autotools (#857) 2018-03-03 22:55:09 +03:30
Garret Rieger f757757eda [subset] Add cmake build def for test-unicode-ranges. 2018-02-26 16:00:33 -08:00
Garret Rieger f82f2a3e50 [subset] Rename hb-os2-unicode-ranges.cc to test-unicode-ranges.cc. 2018-02-26 16:00:33 -08:00
Garret Rieger a570142d0c [subset] Move hb-ot-os2-unicode-ranges into a cc file with a helper methods and tests. 2018-02-26 16:00:33 -08:00
Behdad Esfahbod b91e8da36e Include hb-version.h in git (#825) 2018-02-24 10:21:17 +03:30