Commit Graph

228 Commits

Author SHA1 Message Date
Behdad Esfahbod 5a59de2b98 Actually add +hb_font_get_nominal_glyphs()
New API:
+hb_font_get_nominal_glyphs()
2019-10-28 14:46:59 -07:00
Ebrahim Byagowi a0b4ac4dce Turn 8 spaces to tab across the project
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Behdad Esfahbod aaa85931f3 [font] Update multipliers when creating sub_font
Fixes https://github.com/harfbuzz/harfbuzz/issues/1910
2019-08-20 13:06:10 -07:00
Behdad Esfahbod dcb4cd400f Minor 2019-08-19 11:35:37 -07:00
Ebrahim Byagowi bc27f86ffe
Move HB_NO_VAR to a better place in hb-font.cc
Needed for other works
2019-08-14 22:37:00 +04:30
Ebrahim Byagowi 6a194b6876
Minor, remove trailing spaces in hb-font.{cc,h} as .editorconfig 2019-08-14 18:49:57 +04:30
Behdad Esfahbod 6461143b44 2.6.0 2019-08-13 22:20:54 -07:00
Ebrahim Byagowi 40a4b6ddbd [var] Add a new API, hb_font_set_var_named_instance 2019-07-29 16:23:47 -07:00
Behdad Esfahbod b847769292 [font] Keep font-space to user-space multiplier
Part of https://github.com/harfbuzz/harfbuzz/issues/1801
2019-07-05 13:52:09 -07:00
Behdad Esfahbod df6edcd44c Make face immutable in hb_font_set_face() 2019-07-05 13:45:15 -07:00
Behdad Esfahbod a849873124 [config] Add HB_NO_VAR to disable variations support, enabled by HB_TINY
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 19:26:22 -07:00
Behdad Esfahbod 0819f3ca86 Deprecate v_kerning callback again
Part of https://github.com/harfbuzz/harfbuzz/issues/1682
2019-06-17 14:02:47 -07:00
Behdad Esfahbod 2682efb02d Revert "Deprecate font kern API"
This reverts commit d219f899f4.

API change: Un-deprecate font kern API.

Part of https://github.com/harfbuzz/harfbuzz/issues/1682

We should document that this API is only necessary to hook up
non-OpenType kerning.  hb-ot-font will continue to NOT implement them.
2019-06-17 13:38:49 -07:00
Behdad Esfahbod fca2786041 [config] Make HB_DISABLE_DEPRECATED actually compile
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-11 00:37:01 -07:00
Behdad Esfahbod 227d85e138 Minor 2019-05-10 23:16:14 -07:00
Behdad Esfahbod 4d31662b5d Don't install ot-font funcs on new fonts if HB_NO_OT_FONT defined
Currently linker cannot GC hb-ot-font completely because we install
it on fonts by default.  Don't do that if HB_NO_OT_FONT defined.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-10 15:40:55 -04:00
Behdad Esfahbod 447323b85a Better fix for -Wcast-align errors 2019-01-22 12:50:12 +01:00
Behdad Esfahbod 81ec543d80 More -Wcast-error fixes 2019-01-22 12:43:12 +01:00
Behdad Esfahbod 8d05bf7dc0 Fix cast-align error
If compiler doesn't inline StructAtOffset, this was an error since we
only disable cast-align at call-site.  So, move the cast out.

../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:146:85:   required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
 { return * reinterpret_cast<const Type*> ((const char *) P + offset); }
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:147:79:   required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
 { return * reinterpret_cast<Type*> ((char *) P + offset); }
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-01-22 12:34:05 +01:00
Behdad Esfahbod b900f78088 [pragma] More cast-align whitelist 2019-01-18 10:08:23 -05:00
Behdad Esfahbod 0d8b931bbe [pragma] Allow cast-align in hb-font.cc
../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:144:85:   required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
 { return * reinterpret_cast<const Type*> ((const char *) P + offset); }
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:145:79:   required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
 { return * reinterpret_cast<Type*> ((char *) P + offset); }
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = int]':
2019-01-18 10:03:43 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Behdad Esfahbod ce5da0f36a [shaper] Rewrite shaper data code to be more template-driven than macro-driven 2018-11-16 02:52:20 -05:00
Behdad Esfahbod 925b7a214f Comment 2018-11-11 00:17:30 -05:00
Behdad Esfahbod 93ef20a83b Replace most uses of is_inert with is_immutable 2018-11-03 15:03:06 -04:00
Behdad Esfahbod 5570c87f21 Port objects to use header.writable instead of immutable
Saves 4 or 8 bytes per object on 64bit archs.
2018-11-03 14:59:40 -04:00
Behdad Esfahbod b9db610add Minor 2018-10-31 14:22:31 -07:00
Behdad Esfahbod cf5fa57f00 [docs] Change section titles again
I think I like the uniform "hb-*" more.
2018-10-27 04:51:42 -07:00
Behdad Esfahbod 5dd86aa33b [docs] Rename section titles to object names
More useful.
2018-10-27 04:47:41 -07:00
Behdad Esfahbod 00cf4e5eb6 [docs] Fill in some sections 2018-10-27 04:47:41 -07:00
Behdad Esfahbod 39bd07aed5 Fix bunch of unused parameter warnings
Show up with gcc -O0.

There's a few more but those are functions that need to be filled in.

Maybe this is a lost battle...
2018-10-26 21:22:26 -07:00
Behdad Esfahbod 08b7172969 [font] Fix parallel funcs passing to eachover in infinite-loop
Fixes test just added.
2018-10-19 19:12:33 -07:00
Behdad Esfahbod 3d9a0306eb 2.0.0 2018-10-18 05:58:17 -07:00
Behdad Esfahbod 68c86af187 Always compile deprecated symbols
We haven't been keeping this updated.  So, while we don't expose the
symbols in the headers if HB_DISABLE_DEPRECATED is defined, we still
always build them.
2018-10-12 16:06:39 -04:00
Behdad Esfahbod 07899435b8 Install ot-funcs on newly created funcs
**Finally**!  Casual users can stop caring about font-funcs completely now,
like they haven't been needing to care re unicode-funcs for a few years.
2018-10-09 15:39:51 -04:00
Behdad Esfahbod b314c4e9ab [font] Add get_nominal_glyphs() callback (note the plural)
Unused as of now.  To be wired up to normalizer, which would remove
overhead and allow hb-ot-font initialization to become a no-op, so
we can enable it by default.
2018-10-09 09:43:44 -04:00
Behdad Esfahbod ca6a317012 Minor 2018-10-09 09:43:44 -04:00
Behdad Esfahbod bee93e2697 Add const to get_*_advances API
Ouch!
2018-10-09 08:02:25 -04:00
Behdad Esfahbod d219f899f4 Deprecate font kern API 2018-10-09 00:01:09 -04:00
HinTak f9ea3dc4c6 Missing "out" indicator (#1209)
Missing "out" indicator. Affect gobject introspection.
2018-10-02 09:13:06 +03:30
Behdad Esfahbod 8a31e40629 [font] Make *_advance() fallback to *_advances
And remove redundant implementations.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod 90a0f9fa0c Make TSan happy with make_immutable() 2018-09-26 15:03:07 -04:00
Behdad Esfahbod 55bae6825e [docs] A few improvements
If we wrote just this much every day...
2018-09-24 10:43:06 -04:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Behdad Esfahbod 1f7380944d [atomic] Add hb_atomic_ptr_t<> and port all uses
Found and fixed a couple bugs.

Found a couple multithreading issues.  Marked them with "XXX-MT-bug".
2018-08-09 00:27:01 -07:00
Behdad Esfahbod e49a38b20e 1.8.6 2018-08-07 09:55:42 -07:00
Behdad Esfahbod b0ff79acd8 Add +hb_font_get_glyph_advances_for_direction
New API:
+hb_font_get_glyph_advances_for_direction
2018-08-07 09:52:06 -07:00
Behdad Esfahbod 28e2f467e1 Actually add hb_font_get_glyph_[hv]_advances
New API:
+hb_font_get_glyph_h_advances
+hb_font_get_glyph_v_advances
2018-08-07 09:47:00 -07:00
Behdad Esfahbod 3d7c555a19 Remove get_advances_nil and alias it to get_advances_default 2018-08-07 09:37:52 -07:00
Behdad Esfahbod 79e21984b1 Add batch advance width callback function
New API:
+hb_font_funcs_set_glyph_h_advances_func
+hb_font_funcs_set_glyph_v_advances_func
+hb_font_get_glyph_h_advances
+hb_font_get_glyph_h_advances_func_t
+hb_font_get_glyph_v_advances
+hb_font_get_glyph_v_advances_func_t
2018-08-06 09:45:17 -07:00