Commit Graph

74 Commits

Author SHA1 Message Date
Frédéric Wang c3fa5d0e03 Remove inexistent file ttx file from test/api/Makefile.am 2016-10-24 21:42:04 +02:00
Behdad Esfahbod 34fc4a2cfa Fix dist 2016-10-04 14:47:12 -07:00
Behdad Esfahbod 46cc4a3a2a [MATH] Rename hb_math_*_t types to hb_ot_math_*_t
With this, I believe MATH table API is not ready to be merged.
2016-09-27 16:44:22 +02:00
Frédéric Wang 8d622f1114 Add tests for get_mathvariant (#329) 2016-09-27 13:53:34 +02:00
Frédéric Wang 485e4873fb Add tests for hb_ot_math_get_glyph_variants (#328) 2016-09-27 13:18:00 +02:00
Behdad Esfahbod a5629a2ed9 [MATH] Simplify test 2016-09-27 11:31:29 +02:00
Frédéric Wang edcfa789bf test-ot-math: Use different scales for vertical and horizontal directions and add test for hb_ot_math_get_min_connector_overlap. (#327) 2016-09-27 11:02:08 +02:00
Behdad Esfahbod cdc9eef7da [MATH] Enable tests for glyph-assembly italics-correction 2016-09-26 22:18:41 +02:00
Behdad Esfahbod 86106c7528 [MATH] Rename all API to hb_ot_math_* 2016-09-26 22:14:29 +02:00
Frédéric Wang 51da7a1cd6 MATH table: Add API to access math variants. 2016-09-26 15:18:16 +01:00
Frédéric Wang 722e620f20 Use G_TEST_DIST to build the path of math test fonts 2016-09-26 13:49:18 +01:00
Behdad Esfahbod 17ff30e9af [MATH] Clean up get_top_accent_attachment()
Note, the function now returns "half of horizontal advance width"
if top accent attachment for glyph is not explicitly defined.
This is what the spec requires.  Updated tests.
2016-09-26 12:21:27 +01:00
Behdad Esfahbod 8bcf517fe5 [MATH] Clean up get_italics_correction() 2016-09-26 12:13:14 +01:00
Frédéric Wang d7182d1296 MATH Table: Add API to access glyph info. 2016-09-26 11:32:25 +01:00
Frédéric Wang 319ff59161 MATH Table: Add API to access math contants. 2016-09-26 10:49:09 +01:00
Behdad Esfahbod 4d3892e9b0 [MATH] Fixups for previous commit 2016-09-26 10:45:58 +01:00
Frédéric Wang 5fbcb992bd MATH Table: Add API to check availability of math data. 2016-09-26 10:27:33 +01:00
Sascha Brawer e7ecbba2cc Support Americanist Phonetic Notation
OpenType language system tag: `APPH`
https://www.microsoft.com/typography/otspec/languagetags.htm

IETF BCP47 variant tag: `fonnapa`
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
2016-08-18 14:13:26 +02:00
Behdad Esfahbod 18c19dd34d Fix build 2016-08-09 13:03:14 -07:00
Behdad Esfahbod dd8598c1c7 [test] Pass closure to hb_font_set_glyph_func()
Exercises fix in c335fd7986
2016-02-25 11:20:05 +09:00
Behdad Esfahbod da29b43794 Separate nil font-funcs from parent-peeking font-funcs
API change: all fonts created with hb_font_create() now inherit from
(ie have parent) hb_font_get_empty().
2015-11-04 20:22:44 -08:00
Behdad Esfahbod 3e905e396b Add hb_font_set_parent()
No reason to not have it.  Makes life easier later.
We (hb-ft, hb-ot-font, etc) can use this API to inject new
parent into a font...
2015-10-08 12:51:02 -04:00
Behdad Esfahbod 88da7bba9f Default font scale to face upem
Makes for a better default and avoids nasty inheritance issues.
See mailing list thread "Default hb_font_t scale".
2015-10-02 14:38:20 +01:00
Behdad Esfahbod 1866e17114 Make hb_font_create_sub_font() NOT make parent immutable
We don't rely on that.  However, whenever hb_font_make_immutable()
is called, it makes its parenting chain immutable.
2015-10-02 14:21:29 +01:00
Sascha Brawer f2ad935e19 Handle language tags that indicate phonetic IPA transcription
The BCP-47 registry defines a variant subtag "fonipa" that can be used
in combination with arbitrary other language tags. For example,
"rm-CH-fonipa-sursilv" indicates the Sursilvan dialect of Romansh
as used in Switzerland, transcribed used the International Phonetic
Alphabet.

http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
2015-09-29 14:32:06 +01:00
Behdad Esfahbod fad2674874 Minor 2015-09-01 14:45:46 +01:00
Behdad Esfahbod 31594b98af [test] Fix test-object
See previous commit.
2015-08-30 17:33:04 +01:00
Romain Naour 160f635523 fix static linking with icu-uc
When linking test-unicode statically it needs $(ICU_LIBS)
which contains all required flags.
Especially -lstdc++.

Fixes:
http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef521ca/

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-31 16:12:26 +02:00
Behdad Esfahbod b3a2f6afba [test] Add test for cluster merging
Based on test from https://code.google.com/p/chromium/issues/detail?id=497578

Currently fails.  Basically, if there's a default_ignorable at the
start of text, and font has no space glyph, we remove the default_ignorable,
and that makes the first char in text to correspond to no cluster.

Fix coming.
2015-06-18 17:15:33 -07:00
Behdad Esfahbod eb0bf3ae66 Relax inert checks
Previously, when creating an object from inert inputs (eg:
"hb_font_create(hb_face_get_empty())") we returned the inert
empty object.  This is not helpful as there are legitimate
usecases to do that.

We now never return the inert object unless allocation failed.

Tests are revised to reflect.
2015-04-09 19:16:57 -07:00
Behdad Esfahbod 7d5e7613ce 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.
2014-12-18 18:22:21 -08:00
Behdad Esfahbod b5fbc3b8f5 API: Do not clear buffer-flags in hb_buffer_clear_contents()
After 763e5466c0, one doesn't
need to set flags for different pieces of text.  The flags now
are something the client sets up once, depending on how it
actually uses the buffer.  As such, don't clear it in
clear_contents().

Tests updated.
2014-08-11 18:40:01 -04:00
Behdad Esfahbod 976c8f4552 New API: hb_buffer_[sg]et_replacement_codepoint()
With this change, we now by default replace broken UTF-8/16/32 bits
with U+FFFD.  This can be changed by calling new API on the buffer.
Previously the replacement value used to be (hb_codepoint_t)-1.

Note that hb_buffer_clear_contents() does NOT reset the replacement
character.

See discussion here:

6f13b6d62d

New API:

  hb_buffer_set_replacement_codepoint()
  hb_buffer_get_replacement_codepoint()
2014-07-16 15:34:20 -04:00
Behdad Esfahbod e634fed428 [buffer] Validate UTF-32 input
Same as what we do for UTF-8 and UTF-16.
2014-07-16 14:17:26 -04:00
Behdad Esfahbod af2490c095 Only accept well-formed UTF-8 sequences
Enable tests that were disabled before, and adjust one test,
and add more tests.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod 24b2ba9dfa [test-buffer] Add test for lonely low-surrogate
Currenty fails.  Ouch!
2014-07-10 19:31:16 -04:00
Behdad Esfahbod 6334495ac1 Use zh-Hans / zh-Hant when converting OT language tag to hb_language_t 2014-07-10 19:22:07 -04:00
Behdad Esfahbod f381e320df Fix lang matching logic
Previous code was broken logically, but harmless.
2014-07-10 19:20:35 -04:00
Behdad Esfahbod ee5350d667 Accept BCP 47 zh-Hans / zh-Hant language tags 2014-07-10 19:18:56 -04:00
Behdad Esfahbod 2b051c6057 Rename HB_VERSION_CHECK and hb_version_check to "atleast"
HB_VERSION_CHECK's comparison was originally written wrongly
by mistake.  When API tests were written, they were also written
wrongly to pass given the wrong implementation... Sigh.

Given the purpose of this API, there's no point in fixing it
without renaming it.  As such, rename.

API changes:

  HB_VERSION_CHECK -> HB_VERSION_ATLEAST
  hb_version_check -> hb_version_atleast
2014-06-20 14:09:57 -04:00
Luis de Bethencourt 1eacde00cc check hb_set_is_emtpy in test-set.c 2014-02-10 13:48:43 -05:00
Behdad Esfahbod c77d1ade68 Fix warnings 2013-10-27 23:53:55 +01:00
Behdad Esfahbod 20cbc1f8eb Annotate hb-set a bit; add HB_SET_VALUE_INVALID 2013-09-06 15:31:22 -04:00
Behdad Esfahbod 4dc798de19 Add hb-deprecated.h, and rename a couple enum values
Add deprecated alias for old name.
2013-08-27 11:46:08 -04:00
Behdad Esfahbod 54e6f6c588 Clean up list of Unicode scripts
Rename HB_SCRIPT_CANADIAN_ABORIGINAL to HB_SCRIPT_CANADIAN_SYLLABICS
and a macro for the old name.
2013-08-09 14:36:18 -04:00
Behdad Esfahbod 7235f33f9e Fix misc warnings reported by cppcheck
https://bugs.freedesktop.org/show_bug.cgi?id=65544
2013-06-10 15:08:49 -04:00
Behdad Esfahbod a4446b10bf Fix build for C89 compilers 2013-06-03 18:39:14 -04:00
Behdad Esfahbod 2966d36032 Fix test build 2013-05-28 17:34:37 -04:00
Behdad Esfahbod d9afa11133 Build hb-icu into libharfbuzz-icu.so 2013-05-28 15:27:40 -04:00
Behdad Esfahbod 7d395c2a25 Minor 2013-05-28 15:25:06 -04:00