Behdad Esfahbod
333173103b
Fix sign of shift operators
...
This one:
map->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit);
before the fix, the shift was done as an int, causing overflow
if it ever got to 1 << 31. Sprinkle 'u's around.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=634805
2016-08-08 17:28:14 -07:00
Behdad Esfahbod
aba4b0ca52
Add TODO
2016-06-01 16:57:29 -07:00
Konstantin Ritt
71248a843f
Fix build with HB_DISABLE_DEPRECATED
...
When HB_DISABLE_DEPRECATED is defined, no code from hb-deprecated.h
should be used, even from within HB itself.
2016-02-25 18:55:28 +04:00
Behdad Esfahbod
c335fd7986
In trampoline implementation of get_glyph(), don't destroy user data twice!
2016-02-25 09:16:05 +09: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
Behdad Esfahbod
f11c11a1f1
Fix Since: tags for new API
...
e1d4d0f1db (commitcomment-15006653)
2015-12-16 17:08:36 +01:00
Simon Cozens
6f2e6de1fa
Get font ascender and descender metrics from OS/2 table.
2015-11-27 16:03:54 -05:00
Behdad Esfahbod
c41c145c73
Make nil glyph_h_origin() function return true
...
Fixes https://github.com/behdad/harfbuzz/issues/187
Funcs implementations that have a non-zero horizontal origin must
implement the glyph_h_origin() callback, nothing new here.
Other implementations (all I know of!) can simply not set
glyph_h_origin() now. I did that for hb-ot and hb-ft in
44f8275080
, though that broke the
fallback shaper because the default was returning false...
2015-11-26 18:43:15 -05:00
jfkthame
f19c6db18e
Add braces for subobject initializer in _hb_font_funcs_nil
...
To avoid triggering -Wmissing-braces; see https://bugzilla.mozilla.org/show_bug.cgi?id=1226175#c8
2015-11-20 08:43:49 +00: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
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
Behdad Esfahbod
5d74ff02ab
Fix Since: version tags on font and face APIs
...
A while back we marked every API as version:1.0. We should fix them all
to reflect real version they were introduced. This is a start.
Patch from Nikolay Sivov.
2015-09-03 14:55:59 +04:30
Sascha Brawer
01c3a88543
Fix "Since:" tags
...
Based on data from http://upstream-tracker.org/versions/harfbuzz.html
Resolves #103
2015-06-01 13:25:27 +02: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
Khaled Hosny
a394bb6670
[bindings] Fix *_from_string functions
...
Without the element-type they will be getting garbage, at least with
Python.
2015-03-22 20:29:10 +02:00
Behdad Esfahbod
3f310dc0ca
Disallow changing settings on immutable face
...
Ouch!
2014-07-22 16:26:27 -04:00
Behdad Esfahbod
2a8c49ade0
Remove unnecessary includes
2013-12-11 20:24:20 -05:00
Behdad Esfahbod
a8949df487
[introspection] Annotate Unicode / font callbacks
...
Should move these out of the public header...
We're "clean" of introspection warnings now. Remaining ones are about
graphite2 / freetype types not being introspectable.
2013-09-13 20:31:07 -04:00
Behdad Esfahbod
085d4291a9
[introspection] Disable constructors for now
...
Since our types are not associated with their methods, marking
constructors makes them inaccessible from bindings. Undo for now.
2013-09-12 17:14:33 -04:00
Behdad Esfahbod
70303cf23b
[docs/introspection] Some more annotations
2013-09-06 17:38:25 -04:00
Behdad Esfahbod
288f289997
[docs/introspection] More annotations
2013-09-06 17:30:54 -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
e05a999495
Add hb_face_[sg]et_glyph_count()
2012-11-15 16:23:21 -08:00
Behdad Esfahbod
7c8e844d92
Use namespace for OpenType tables
...
Avoids USHORT, SHORT, ULONG, LONG clashes with Windows API.
2012-08-28 17:57:49 -04: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
368b4e7649
Minor
2012-08-06 23:06:04 -04:00
Behdad Esfahbod
66591ececf
Remove unnecessary lifecycle bits
...
We already set recount to INVALID when destroying.
This block was not necessary.
2012-08-06 17:07:19 -07: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
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
0594a24484
Cleanup TRUE/FALSE vs true/false
2012-06-05 20:35:40 -04:00
Behdad Esfahbod
f06ab8a426
Better hide nil objects and make them const
2012-06-05 14:49:14 -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
20fdb0f41d
Add a lock-free cache type for int->int functions
...
To be used for cmap and advance caching if desired.
2012-05-17 22:04:45 -04:00
Behdad Esfahbod
d993e72331
Fix hb_face_set_index()
2012-05-13 16:04:36 +02:00
Behdad Esfahbod
0cd33592ab
Fix possible leaks
2011-09-21 16:49:33 -04:00
Behdad Esfahbod
b9415e76d7
[API] Add hb_font_set_funcs_data()
2011-08-19 19:20:30 +02:00
Behdad Esfahbod
7a750ac33e
Rename table files from eg maxp-private.hh to maxp-table.hh
2011-08-17 14:19:59 +02:00
Behdad Esfahbod
33ccc77902
[API] Make set_user_data() functions take a replace parameter
...
We need this to set data on objects safely without worrying that some
other thread unsets it by setting it at the same time.
2011-08-09 00:43:24 +02: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