Commit Graph

392 Commits

Author SHA1 Message Date
Khaled Hosny 0615c7b64b Remove workaround for old pkg-config
Add FreeType dependency to .pc, Ubuntu 14.4 is long dead.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1565
2020-03-10 22:04:35 +02:00
Garret Rieger 14a7b6f1ab Set hb_buffer_t to use array_t.reverse(). 2020-03-04 16:52:29 -08:00
Rico Tzschichholz 2c9fbf5561 Improve GIR build 2020-02-19 14:12:29 +03:30
Ebrahim Byagowi 23277beef9 Fold src/test-ot-glyph and src/test-ot-color into src/main 2020-01-24 19:56:06 +03:30
Ebrahim Byagowi b72337e57e [test] Adopt test-ot-color with ot-glyph and remove freetype/cairo dependecy 2020-01-24 19:56:06 +03:30
Ebrahim Byagowi f883c31cce Implement glyph outline path API
Got help from https://github.com/opentypejs/opentype.js/blob/4e0bb99/src/tables/glyf.js#L222
2020-01-10 14:25:06 +03:30
blueshade7 ff87465b40 add get_glyph_from_name & test. use hb_string_array 2019-11-26 18:34:06 +00:00
David Corbett e6351d9b2c Add ms-use/IndicShapingInvalidCluster.txt 2019-11-11 14:51:34 -08:00
David Corbett b372c3e956 Insert a dotted circle within <U+0B85, U+0BC2> 2019-11-11 14:51:34 -08:00
Ebrahim Byagowi 3d5b1df7ab [number] Add test 2019-09-04 02:04:09 +04:30
Ebrahim Byagowi 62932c14bd [meta] Rename ot-metadata to ot-meta per review 2019-07-25 17:49:51 -07:00
Ebrahim Byagowi 80e246a1f2 [meta] Add a test program for metadata 2019-07-25 17:49:51 -07:00
Ebrahim Byagowi eb8bd2f7ec Add hb_gdi_face_create API
Based on Konstantin Ritt work posted on mailing list
2019-07-21 14:22:19 -07:00
Ebrahim Byagowi 9fea6b4dd4
[amalgam] Use it in cmake port and fix conflicts (#1812) 2019-07-05 18:46:41 +04:30
Behdad Esfahbod b240d701fd [amalgam] Include integration source files as well
Just for those that are normally built into libharfbuzz itself.

Part of https://github.com/harfbuzz/harfbuzz/issues/1809
2019-07-03 12:17:57 -07:00
Behdad Esfahbod d515242045 [amalgam] Rename hb.cc to harfbuzz.cc
Part of https://github.com/harfbuzz/harfbuzz/issues/1809
2019-07-03 12:10:03 -07:00
Behdad Esfahbod 04a4957040 [amalgam] Add hb.cc to git
Part of https://github.com/harfbuzz/harfbuzz/issues/1809
2019-07-02 16:19:18 -07:00
Behdad Esfahbod c073233f45 Add make rule to build hb.cc
Part of https://github.com/harfbuzz/harfbuzz/issues/1809
2019-07-02 14:26:45 -07:00
Behdad Esfahbod f1d20d9b4d Add ucd-table make target 2019-07-02 14:18:38 -07:00
Michiharu Ariza 040b261dee add bimap test along with bug fix/tweaks 2019-07-01 13:54:36 -07:00
Behdad Esfahbod 8786820a5a [src] Add make targets "tiny" and "tinyz" 2019-06-26 12:55:46 -07:00
Behdad Esfahbod aa3450cac1 [config] Don't compile disabled features
This makes it possible to include all .cc files into build, even if not
building CoreText, Uniscribe, etc.

This was mostly to help custom builders.  But also means that we can
include all files in our own build system.  Not sure if we should.
Definitely simplifies things, but slightly only.
2019-06-17 22:41:49 -07:00
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
Ben Boeckel d38f37b2e3 autoconf: provide a harfbuzz-config for use from CMake (#822) 2018-02-24 01:25:53 +03:30
Behdad Esfahbod e0939d811f Clean up check-defs and check-symbols (#821)
Also, call c++filt on their results.

Also build and fix and check harfbuzz-gobject.def

Also changes harfbuzz-gobject to distribute generated enum sources.
2018-02-24 00:49:34 +03:30
Behdad Esfahbod abc82b493e Add Ragel-generated files to git
I know it's bad form; I know I've said no to this multiple times...
But this is part of an experiment to see if we can make rolling HarfBuzz
into Chrome much faster. That will give us a lot more testing exposure
that currently Chrome does.

Doing this while those files are still considered ignored by our
gitignore rules; will see how that flies.
2018-02-20 14:36:14 -08:00
Behdad Esfahbod e2d2d81984 Limit how much work sanitize() can do
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6022
2018-02-18 17:28:53 -08:00
Behdad Esfahbod 2903b2f357 Another linker tweaking
Trying to fix this warning:
cc1: warning: command line option ‘-fno-threadsafe-statics’ is valid for C++/ObjC++ but not for C

Let's see what the clang bots think of it.
2018-02-14 15:46:27 -08:00
Behdad Esfahbod ccae99fdad Another try 2018-02-14 11:12:09 -08:00
Behdad Esfahbod 8c3612af65 Tweak Makefile some more 2018-02-14 10:57:34 -08:00
Behdad Esfahbod d594f947b6 [subset] Allow linking to libstdc++
We want to use it.
2018-02-14 10:55:25 -08:00
Ebrahim Byagowi 109314cb55
Another attempt on fixing the tests on Travis (#788) 2018-02-14 21:05:11 +03:30
Behdad Esfahbod 507804479a [use] Add dump-use-data 2018-02-13 21:46:28 -08:00
Behdad Esfahbod 15ba4fbe01 [khmer] Add dump-khmer-data 2018-02-13 21:41:51 -08:00
Behdad Esfahbod effddd03bd [myanmar] Add dump-myanmar-data 2018-02-13 21:38:15 -08:00
Behdad Esfahbod c0e45b60a0 [indic] Rename print-indic-table to dump-indic-data
Makes more sense given what this prints, err, dumps.
2018-02-13 21:25:16 -08:00
Behdad Esfahbod 8634846a0a More tweaking linker and linker flags 2018-02-13 21:18:00 -08:00
Behdad Esfahbod 397ed53e55 [indic] Add print-indic-table 2018-02-13 18:54:26 -08:00
Behdad Esfahbod aeed082e28 Another tweak at libstdc++ things
To fix this warning:

cc1: warning: command line option ‘-fno-threadsafe-statics’ is valid for C++/ObjC++ but not for C
2018-02-13 14:02:59 -08:00
Behdad Esfahbod 28e63a1287 Disable threadsafe static's for all libraries
Even in libharfbuzz-subset, we still will handle our own threadsafety
for statics.
2018-02-13 13:50:21 -08:00
Behdad Esfahbod b969a82e30 Pass no-libstdc++ flags only to libraries suppressing it 2018-02-12 20:51:26 -08:00
Behdad Esfahbod 42040a273f Allow libharfbuzz-subset to link to libstdc++
We want to use it instead of reinventing hashmap...

Also, don't change linker for ICU since libicu also uses libstdc++.
2018-02-12 18:41:36 -08:00
Ebrahim Byagowi 4af3c5e258 Move linker specifying to a better place 2018-02-12 18:39:42 -08:00
Khaled Hosny 0b94d590d9 Rename --with-stdcpp → --with-libstdc++
Also improve wording a bit and fix make check in --with-libstdc++=yes.
2018-02-12 12:37:41 -07:00
Ebrahim Byagowi 91f0d51f05
Fix symbol exporting issue on msys2 and bringing all the bots (#781) 2018-02-12 17:20:12 +03:30
Ebrahim Byagowi a9b650d384
Apply check-defs.sh to -icu and -subset, toward mingw fix (#780) 2018-02-12 15:10:13 +03:30
Ebrahim Byagowi 2efc896550
Add --with-stdcpp for ossfuzzer and mupdf use (#770) 2018-02-12 12:00:07 +03:30
Ebrahim Byagowi 844f48ea9a
Fix symbol exporting and libstdc++ linkage of hb-subset (#769) 2018-02-10 23:13:12 +03:30
Behdad Esfahbod 3b68a03a1c [fuzzer] Minor 2018-02-08 17:00:37 -06:00
Behdad Esfahbod eeffabc875 Build 2018-02-07 21:34:05 -06:00
Behdad Esfahbod ae39fc8171 [subset] Build hb-subset into separate libharfbuzz-subset.so 2018-02-04 20:18:52 -05:00