Commit Graph

70 Commits

Author SHA1 Message Date
Behdad Esfahbod 26648cebcd [GX] Remove (partial) support for anisotropic variations
It doesn't always work, not part of FreeType, and we were not going
to expose it in the API anyway.  Can always be added later.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod ca28670316 [GX] Towards anisotropic interpolation
Also hookup to ValueRecord and Anchors.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod 6d9d3c55bb [GX] Add data types for encoding numerical variations 2016-12-16 19:06:26 -06:00
Behdad Esfahbod 2b117720c0 Use horizontal ascent as fallback vertical origin 2016-10-26 18:12:50 +02:00
Behdad Esfahbod a7b32f2057 Move code around 2016-10-26 18:08:41 +02:00
Behdad Esfahbod 9ee23c49a7 Fix vertical glyph origin with hb-ot-font 2016-10-26 18:01:24 +02:00
Behdad Esfahbod b3b0816d5f Fix vertical font metrics
Ouch!
2016-10-26 18:01:20 +02:00
Behdad Esfahbod 353f455af7 [MATH] Wire up get_glyph_variants() 2016-09-26 21:25:00 +02:00
Behdad Esfahbod 7fe0e28c22 [MATH] Start fleshing out glyph variant API 2016-09-26 17:51:47 +01:00
Behdad Esfahbod 4b8de1ea80 Round, not truncate, when scaling values
Fixes https://github.com/behdad/harfbuzz/issues/255
2016-06-06 23:08:54 -07:00
Behdad Esfahbod 8b5bc141cd Add get_nominal_glyph() and get_variation_glyph() instead of get_glyph()
New API:
- hb_font_get_nominal_glyph_func_t
- hb_font_get_variation_glyph_func_t
- hb_font_funcs_set_nominal_glyph_func()
- hb_font_funcs_set_variation_glyph_func()
- hb_font_get_nominal_glyph()
- hb_font_get_variation_glyph()

Deprecated API:
- hb_font_get_glyph_func_t
- hb_font_funcs_set_glyph_func()

Clients that implement their own font-funcs are encouraged to replace
their get_glyph() implementation with a get_nominal_glyph() and
get_variation_glyph() pair.  The variation version can assume that
variation_selector argument is not zero.
2016-02-24 19:05:23 +09:00
Steven R. Loomis a13b023dbf AIX fixes
- use '-w' instead of '\<...\>' for check-header-guards
  grep manpage says these are the same

- put '-q' first in the grep options

- move VAR into hb-private.hh

- hb-font-private.hh - use [VAR] instead of [] for variable array
2015-12-12 17:44:44 -08:00
Simon Cozens 6f2e6de1fa Get font ascender and descender metrics from OS/2 table. 2015-11-27 16:03:54 -05:00
Behdad Esfahbod ea512f7108 Use C-style casts instead of compare to 0, to convert hb_bool_t to bool 2015-11-26 19:22:22 -05:00
Behdad Esfahbod 28de104f15 Move variable-sized struct member to end
Hopefully makes clang build happy
2015-11-04 22:03:09 -08:00
Behdad Esfahbod 762770c964 Add font->has_...() to check for individual nil font funcs
Hopefully this wouldn't break any compiler.  There was some magic
moments to getting this to compile...
2015-11-04 21:49:19 -08:00
Behdad Esfahbod 88e9a9bcae Minor reshaping of hb_font_funcs_t implementation
In anticipation of further changes.  No functional changes.
2015-11-04 21:16:26 -08:00
Behdad Esfahbod a6a7715bac Comments 2015-11-04 20:51:21 -08:00
Behdad Esfahbod bee901b38e Optimize positioning direction calculations
It makes the binary smaller AND faster.  Yumm!
2015-11-04 19:28:17 -08:00
Behdad Esfahbod 50f489a0a0 Typo 2015-10-11 20:59:29 -04:00
Behdad Esfahbod 8de20b1e8a Add font->has_glyph() 2014-01-02 14:30:45 +08:00
Behdad Esfahbod 2a8c49ade0 Remove unnecessary includes 2013-12-11 20:24:20 -05:00
Behdad Esfahbod 83408cf804 Fix llvm warnings on Mac
Patch from Scott Fleischman.  Warnings were:

harfbuzz/src/hb-font-private.hh:121:42: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-font-private.hh:126:42: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-font-private.hh:400:85: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-ot-layout-common-private.hh:1115:37: Implicit conversion
loses integer precision: 'long long' to 'int'
harfbuzz/src/hb-ft.cc:421:97: Implicit conversion loses integer
precision: 'unsigned long long' to 'int'
harfbuzz/src/hb-ft.cc:422:97: Implicit conversion loses integer
precision: 'unsigned long long' to 'int'
2013-11-06 14:46:04 -05:00
Behdad Esfahbod 288f289997 [docs/introspection] More annotations 2013-09-06 17:30:54 -04:00
Behdad Esfahbod 5a5350b39b Revert "Round when scaling values"
This reverts commit 10f964623f.

See discussion with Khaled Hosny on mailing list.  In short, since
integers here can be negative, and int division is "round towards
zero", proper rounding should take sign into account.  Just skip
doing it again, has been serving us well before.
2013-09-03 20:11:01 -04:00
Behdad Esfahbod 2e3a07abdf Separate face source code from font
Makes documentation / introspection easier.
2013-08-27 11:46:08 -04:00
Behdad Esfahbod 38b8b40526 Fix possible snprintf OOM
https://bugzilla.redhat.com/show_bug.cgi?id=1001645
2013-08-27 11:46:07 -04:00
Behdad Esfahbod 10f964623f Round when scaling values
Doesn't matter for most users since they should be working in a
fixed sub-pixel scale anyway (ie. 22.10, 26.6, 16.16, etc).
2013-08-09 09:40:01 -04:00
Behdad Esfahbod df8f70ae5d Minor 2013-08-09 09:35:10 -04:00
Behdad Esfahbod ce8badf180 Minor 2013-08-09 09:31:06 -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 e05a999495 Add hb_face_[sg]et_glyph_count() 2012-11-15 16:23:21 -08:00
Behdad Esfahbod 4c8ac4f47e Misc minor fixes 2012-08-08 17:44:19 -04:00
Behdad Esfahbod 6f3a300138 Add hb_font_glyph_from/to_string 2012-08-07 22:13:25 -04:00
Behdad Esfahbod 8fbfda920e Inline font getters 2012-08-01 19:03:46 -04:00
Behdad Esfahbod 2f87cebe10 Implement shape_plan caching
Should give us some performance boost.
2012-07-27 04:20:39 -04:00
Behdad Esfahbod ea278d3895 Partially switch ot shaper to shape_plan 2012-07-27 02:12:28 -04:00
Behdad Esfahbod 5b95c148cc Start implementing shape_plan 2012-07-27 01:02:24 -04:00
Behdad Esfahbod 027857d041 Start adding a unified shaper access infrastructure
Add global shape_plan.  Unused so far.
2012-07-26 21:14:02 -04:00
Behdad Esfahbod 1bc1cb3603 Make source more digestable for gobject-introspection 2012-06-16 15:21:55 -04:00
Behdad Esfahbod 6220e5fc0d Add ASSERT_POD for most objects 2012-06-06 03:30:09 -04:00
Behdad Esfahbod bce095524b Add hb_font_get_glyph_name() and hb_font_get_glyph_from_name() 2012-05-28 10:45:50 -04:00
Behdad Esfahbod 3897335c76 [API] Sort out get_blob API
hb_face_get_blob() renamed to hb_face_reference_blob(), returns a
reference now.

hb_face_[sg]et_index() added.

hb_face_set_upem() added.
2011-08-08 23:37:41 +02:00
Behdad Esfahbod e715784be3 Rename get_table to reference_table in all API 2011-08-08 21:43:06 +02:00
Behdad Esfahbod c605bbbb6d Remove C++ guards from source files
Where causing issues for people with MSVC.
2011-08-04 20:00:53 -04:00
Behdad Esfahbod 4b6317c4f4 More code shuffling 2011-07-07 23:14:42 -04:00
Behdad Esfahbod 60fbb36096 [Vertical] GPOS is always done with horizontal origin 2011-05-19 18:46:15 -04:00
Behdad Esfahbod 7e2c85de30 [API] Vertical support, take 2
I like this API *much* better.  Implementation still incomplete, but
horizontal works.
2011-05-17 17:55:03 -04:00
Behdad Esfahbod 744970af4d [API] Add support for vertical text
Design not final yet, and in fact I'm going to change it immediately,
but this is an standalone change for itself.
2011-05-17 17:12:34 -04:00
Behdad Esfahbod 7fc5a30cb4 [API] Add hb_face_make/is_immutable() 2011-05-12 17:48:20 -04:00