History log of /external/harfbuzz_ng/src/hb-ft.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a319d0777b746a2bbe5cd5a206172f1580da3379 23-Jan-2015 Behdad Esfahbod <behdad@behdad.org> [ft] Handle negative x_scale / y_scale
/external/harfbuzz_ng/src/hb-ft.cc
fb85d618f5883458bacf0ecb0894772291a2d738 05-Jan-2015 Chris Peterson <cpeterson@mozilla.com> Add #ifdef HB_USE_ATEXIT to fix -Wunused-function warnings
/external/harfbuzz_ng/src/hb-ft.cc
f34aaba8687a20794835e2dc878c52d1b53e6f85 29-Dec-2014 Behdad Esfahbod <behdad@behdad.org> [ft] Don't set font ppem

For discussion see:

http://lists.freedesktop.org/archives/harfbuzz/2012-April/001905.html

Over time we have had added NO_HINTING all over the place in hb-ft. Finish it off.
Not setting ppem on hb-font disables get_contour_point() calls which is good anyway.

See comments in the commit.
/external/harfbuzz_ng/src/hb-ft.cc
350f3a02ce225e5d78db8ac96de1351ff9f96dd5 29-Dec-2014 Behdad Esfahbod <behdad@behdad.org> [ft] Add hb_ft_face_create_referenced() and hb_ft_font_create_referenced()

When I originally wrote hb-ft, FreeType objects did not support reference
counting. As such, hb_ft_face_create() and hb_ft_font_create() had a
"destroy" callback and client was responsible for making sure FT_Face is
kept around as long as the hb-font/face are alive.

However, since this was not clearly documented, some clienets didn't
correctly did that. In particular, some clients assumed that it's safe
to destroy FT_Face and then hb_face_t. This, indeed, used to work, until
45fd9424c723f115ca98995b8f8a25185a6fc71d, which make face destroy access
font tables.

Now, I fixed that issue in 395b35903e052aecc97d0807e4f813c64c0d2b0b since
the access was not needed, but the problem remains that not all clients
handle this correctly. See:

https://bugs.freedesktop.org/show_bug.cgi?id=86300

Fortunately, FT_Reference_Face() was added to FreeType in 2010, and so we
can use it now. Originally I wanted to change hb_ft_face_create() and
hb_ft_font_create() to reference the face if destroy==NULL was passed in.
That would improve pretty much all clients, with little undesired effects.
Except that FreeType itself, when compiled with HarfBuzz support, calls
hb_ft_font_create() with destroy==NULL and saves the resulting hb-font on
the ft-face (why does it not free it immediately?). Making hb-face
reference ft-face causes a cycling reference there. At least, that's my
current understanding.

At any rate, a cleaner approach, even if it means all clients will need a
change, is to introduce brand new API. Which this commit does.

Some comments added to hb-ft.h, hoping to make future clients make better
choices.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=75299
/external/harfbuzz_ng/src/hb-ft.cc
9a3b74884b2e41c7040611030f4336f13d18fd3e 29-Dec-2014 Behdad Esfahbod <behdad@behdad.org> Remove redundant check for FT_Face_GetCharVariantIndex

We require FreeType >= 2.8.3. This symbol was introduced earlier
than that.
/external/harfbuzz_ng/src/hb-ft.cc
affacf2f37db767ab8df7f2db6cd9e0e9b0a2b8a 29-Dec-2014 Behdad Esfahbod <behdad@behdad.org> [ft] Open blob in READONLY mode

HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE is deprecated and fairly
useless now.
/external/harfbuzz_ng/src/hb-ft.cc
8afaf096870d7895cf2fffb6438b02c0ad1b6c52 02-Oct-2014 Behdad Esfahbod <behdad@behdad.org> [ft] Add NO_HINTING in a couple other places
/external/harfbuzz_ng/src/hb-ft.cc
38fb30d7420a4b01f99cee31baa8c3990a1d1c5f 06-Aug-2014 Behdad Esfahbod <behdad@behdad.org> Use atexit() only if it's safe to call from shared library

Apparently they are not (advertised as?) safe on BSD systems.
We ignore the case of static libraries.

Whitelisted on glibc, Android, and MSVC / mingw.

https://bugs.freedesktop.org/show_bug.cgi?id=82246
/external/harfbuzz_ng/src/hb-ft.cc
83408cf804a6908873c41b70bb7c43448e66ddd2 06-Nov-2013 Behdad Esfahbod <behdad@behdad.org> 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'
/external/harfbuzz_ng/src/hb-ft.cc
755b44cce6dc23376a3cf0212893609231fa4967 18-Oct-2013 Behdad Esfahbod <behdad@behdad.org> [ft] Round metrics instead of truncate

Lohit-Punjabi has a upem of 769! We were losing one unit in our
code, and FreeType is losing another one... Test with U+0A06.
Has an advance of 854 in the font. We were producing 852.
Now we do 853, which is what FreeType is telling us.
/external/harfbuzz_ng/src/hb-ft.cc
ace5c7eb4c2302a6a7eb3576e6dbc3bc026e569c 14-Sep-2013 Behdad Esfahbod <behdad@behdad.org> [introspection] hb-ft annotations
/external/harfbuzz_ng/src/hb-ft.cc
e509d35cf1160f1449bc736b9445cdf61ab81d06 11-Jul-2013 Behdad Esfahbod <behdad@behdad.org> [ft] hb_ft_get_glyph_from_name fails for the name of glyph id 0

Based on patch from Jonathan Kew, as reported on the mailing list.
/external/harfbuzz_ng/src/hb-ft.cc
79d1007a501fd63c0ba4d51038c513e6b8b94740 14-Jun-2013 Behdad Esfahbod <behdad@behdad.org> If variation selector is not consumed by cmap, pass it on to GSUB

This changes the semantics of get_glyph() callback and expect that
callbacks return false if the requested variant is not available, and
then we will call them back with variation_selector=0 and will retain
the glyph for the selector in the glyph stream.

Apparently most Mongolian fonts implement the Mongolian Variation
Selectors using GSUB, not cmap.

https://bugs.freedesktop.org/show_bug.cgi?id=65258

Note that this doesn't fix the Mongolian shaping yet, because the way
that's implemented is that the, say, 'init' feature ligates the letter
and the variation-selector. However, since currently the variation
selector doesn't have the 'init' mask on, it will not be matched...
/external/harfbuzz_ng/src/hb-ft.cc
190e19e6842875c7a487c66235300ee6b42fb5da 10-Mar-2013 Behdad Esfahbod <behdad@behdad.org> [ft] Remove TODO items that I'm not going to fix
/external/harfbuzz_ng/src/hb-ft.cc
392ee97431b368ee74e1b521fd539b69d2efadfb 10-Mar-2013 Behdad Esfahbod <behdad@behdad.org> [ft] Remove TODO item re FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH

That flag is redundant, deprecated, and ignored since April 2011.
From FreeType git log:

commit 8c82ec5b17d0cfc9b0876a2d848acc207a62a25a
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Thu Apr 21 08:21:37 2011 +0200

Always ignore global advance.

This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant,
deprecated, and ignored. The new behavior is what every major user
of FreeType has been requesting. Global advance is broken in many
CJK fonts. Just ignoring it by default makes most sense.

* src/truetype/ttdriver.c (tt_get_advances),
src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics,
tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph),
src/truetype/ttgload.h: Implement it.

* docs/CHANGES: Updated.
/external/harfbuzz_ng/src/hb-ft.cc
5594c2d112c295147ee69215a2ce9dfd99984aa0 07-Mar-2013 Behdad Esfahbod <behdad@behdad.org> [FT] Just return if glyph name not found

The fallback happens in higher level already. No need to do here.
/external/harfbuzz_ng/src/hb-ft.cc
e9171af55cc6a402eb20db4ea74c86a0b1e70e85 30-Jan-2013 Behdad Esfahbod <behdad@behdad.org> Bug 60053 - hb-common.cc:181:6: warning: ‘void free_langs()’ defined but not used
/external/harfbuzz_ng/src/hb-ft.cc
d05ac7dc3f2949e85f1fe996315b31b7aae370fe 12-Nov-2012 Behdad Esfahbod <behdad@behdad.org> Fix hb-ft glyph name for broken fonts that return empty glyph names
/external/harfbuzz_ng/src/hb-ft.cc
21756934a15e31dc243e2b6d80adec5752477652 08-Aug-2012 Behdad Esfahbod <behdad@behdad.org> [OT] Implement fallback positioning

Implemented for Arabic, Hebrew, and generic marks.
Activated if no GPOS table present.
/external/harfbuzz_ng/src/hb-ft.cc
271c8f89075607c689938b4f5e60323d9a1acd70 13-Jul-2012 Behdad Esfahbod <behdad@behdad.org> Minor
/external/harfbuzz_ng/src/hb-ft.cc
2023e2b54d91924dddfd228ffdbb46021135b068 12-Jul-2012 Behdad Esfahbod <behdad@behdad.org> [ft] Disable ppem setting

The calculations were wrong.

FreeType makes it really hard to set size and ppem independently.
For now, disable it. Need to come up with a fix later.
/external/harfbuzz_ng/src/hb-ft.cc
cdf7444505a7ae49d20f9ba6776dea92c1fde2a6 12-Jul-2012 Behdad Esfahbod <behdad@behdad.org> [ft] Use unfitted kerning if x_ppem is zero
/external/harfbuzz_ng/src/hb-ft.cc
0594a2448440208efa0acac9a5d8d52d43108289 06-Jun-2012 Behdad Esfahbod <behdad@behdad.org> Cleanup TRUE/FALSE vs true/false
/external/harfbuzz_ng/src/hb-ft.cc
f64b2ebf82c5f355cd95806478cd30c00b1a2731 06-Jun-2012 Behdad Esfahbod <behdad@behdad.org> Remove last static initializer

We're free! Lazy or immediate...
/external/harfbuzz_ng/src/hb-ft.cc
04aed572f112b96a6033cd6c3df7bdba5e29e93c 06-Jun-2012 Behdad Esfahbod <behdad@behdad.org> Make hb-ft static-initializer free
/external/harfbuzz_ng/src/hb-ft.cc
f06ab8a4262c759b4723614fd28f55ee77aa8466 05-Jun-2012 Behdad Esfahbod <behdad@behdad.org> Better hide nil objects and make them const
/external/harfbuzz_ng/src/hb-ft.cc
bce095524b3e69a47f8e88a2fb02d6ab537f9b0a 27-May-2012 Behdad Esfahbod <behdad@behdad.org> Add hb_font_get_glyph_name() and hb_font_get_glyph_from_name()
/external/harfbuzz_ng/src/hb-ft.cc
323190c27b80cddc9b3c42d19f1f243e2acb2411 12-Apr-2012 Behdad Esfahbod <behdad@behdad.org> Minor
/external/harfbuzz_ng/src/hb-ft.cc
0b7e4d9f20b3ed947d0c441ca59b43c4097cdb0e 15-Aug-2011 Behdad Esfahbod <behdad@behdad.org> [ft] FT_Get_Advance() for advance-width callbacks

Using graphite2's comparerenderer suggests that this makes hb-ft 15
times faster. No caching layer needed anymore.
/external/harfbuzz_ng/src/hb-ft.cc
553bc3de82cfda8d83db26a93205e0d39440cbd1 15-Aug-2011 Behdad Esfahbod <behdad@behdad.org> Minor
/external/harfbuzz_ng/src/hb-ft.cc
254142bb67a5c520a304142301479eb5292592d1 15-Aug-2011 Behdad Esfahbod <behdad@behdad.org> [ft] FT_Select_Charmap() when we create face
/external/harfbuzz_ng/src/hb-ft.cc
9527fb200ffbbd839334e99b51d9671752d393db 13-Aug-2011 Behdad Esfahbod <behdad@behdad.org> Fix missing return
/external/harfbuzz_ng/src/hb-ft.cc
01ec13a1d9ae380305b593e1c52cebb0e8327cb6 10-Aug-2011 Behdad Esfahbod <behdad@behdad.org> Implement hb_ft_font_get_face
/external/harfbuzz_ng/src/hb-ft.cc
13a601fe99f237b08b7166448e386eaea0b77294 09-Aug-2011 Behdad Esfahbod <behdad@behdad.org> [FT] Don't make font immutable
/external/harfbuzz_ng/src/hb-ft.cc
38b2118724600521c6ad1e49df0667dcdf863634 09-Aug-2011 Behdad Esfahbod <behdad@behdad.org> [API] Add hb_ft_font_set_funcs(), remove hb_ft_get_font_funcs()

Remove hb_ft_get_font_funcs() as it cannot be used by the user anyway.

Add hb_ft_font_set_funcs(). Which will make the font internally use
FreeType. That is, no need for the font to have created using the
hb-ft API. Just create using hb_face_create()/hb_font_create() and
then call this on the font (after having set font scale). This
internally creates an FT_Face and attached to the font.
/external/harfbuzz_ng/src/hb-ft.cc
de1e1cf9bccfd116d495804e230dc2e12b733a2d 09-Aug-2011 Behdad Esfahbod <behdad@behdad.org> [FT] Adapt to new face API
/external/harfbuzz_ng/src/hb-ft.cc
3897335c7620c37e9a0224b0c42ade0dfdce4053 08-Aug-2011 Behdad Esfahbod <behdad@behdad.org> [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.
/external/harfbuzz_ng/src/hb-ft.cc
e715784be35f0846c0e084b7c53c7556ce933a45 08-Aug-2011 Behdad Esfahbod <behdad@behdad.org> Rename get_table to reference_table in all API
/external/harfbuzz_ng/src/hb-ft.cc
c605bbbb6d4b2a98b1f40ca818760088d991f7d1 05-Aug-2011 Behdad Esfahbod <behdad@behdad.org> Remove C++ guards from source files

Where causing issues for people with MSVC.
/external/harfbuzz_ng/src/hb-ft.cc
2d8ebcb9d089c2cfbefac71ca6350e2703ab13e3 25-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] One last font-funcs API change

Now that vertical text works correctly, I'm doing a last round
modification of the font-funcs API to simplify. Expect no more
changes around here.
/external/harfbuzz_ng/src/hb-ft.cc
60fbb36096e344e9af79409ce8cfe3f1f7b0d321 20-May-2011 Behdad Esfahbod <behdad@behdad.org> [Vertical] GPOS is always done with horizontal origin
/external/harfbuzz_ng/src/hb-ft.cc
8b38faeede41e64eb0f6ac2e12ce51dd7138d50a 19-May-2011 Behdad Esfahbod <behdad@behdad.org> More vertical

Starting to get there, but not without yet another round of changes.

I think I know wheere to go now.
/external/harfbuzz_ng/src/hb-ft.cc
190981851fe2bb6479b5c72451279f66fe4f6e23 18-May-2011 Behdad Esfahbod <behdad@behdad.org> Cosmetic
/external/harfbuzz_ng/src/hb-ft.cc
7e2c85de305be59e1a6afa7d2061e4b7dd00acf7 17-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Vertical support, take 2

I like this API *much* better. Implementation still incomplete, but
horizontal works.
/external/harfbuzz_ng/src/hb-ft.cc
744970af4d884cc87ffa645804578fec8df674a9 17-May-2011 Behdad Esfahbod <behdad@behdad.org> [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.
/external/harfbuzz_ng/src/hb-ft.cc
56d12e0356bee5a95b870dfbc2100b8caeb5d593 16-May-2011 Behdad Esfahbod <behdad@behdad.org> Remove unnecessary TODO item
/external/harfbuzz_ng/src/hb-ft.cc
0fd8c2f1be693616f19f2f1526369874763d6cf6 12-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Make get_glyph() callback return a boolean

We need to know whether the glyph exists, so we can fallback to
composing / decomposing. Assuming that glyph==0 means "doesn't exist"
wouldn't work for applications like Pango that want to use different
"doesn't exist" glyph codes for different characters. An explicit
return value fixes that.
/external/harfbuzz_ng/src/hb-ft.cc
805af72405a2f653f08de392d7172291ffe8e902 12-May-2011 Behdad Esfahbod <behdad@behdad.org> Rename get_kernings() arguments from first/second_glyph to left/right_glyph

Makes it clear that kerning is in visual order.
/external/harfbuzz_ng/src/hb-ft.cc
7033518f756490e9cf00b96387fee6f2f7fae785 12-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Pass face to get_table()
/external/harfbuzz_ng/src/hb-ft.cc
b46782780690e26a8221e2d63dd224159aebe413 12-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Remove const from font user_data
/external/harfbuzz_ng/src/hb-ft.cc
9a14688e40e926b9453fcb75891f27bff1e45c49 12-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Rename hb_face_create_for_data() to hb_face_create()
/external/harfbuzz_ng/src/hb-ft.cc
a513dbcf73ab1cc39a7c9653034904d0c6cd9fe9 11-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Change signature of get_contour_point and get_kerning ffuncs

get_contour_point now takes glyph id before point_index.

get_kerning now takes a vector to fill-in.
/external/harfbuzz_ng/src/hb-ft.cc
b9d975b931d6310f25fab5ac280f523cdc27bf94 11-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Pass down closure user_data to font funcs
/external/harfbuzz_ng/src/hb-ft.cc
d292885893395dcb345dce1010e5c8628a715ef4 03-May-2011 Behdad Esfahbod <behdad@behdad.org> [ft] Fix font->face handling

Don't use _cached()
/external/harfbuzz_ng/src/hb-ft.cc
72657e4ce757dcb055a8db7291b68f96f0d34bfb 03-May-2011 Behdad Esfahbod <behdad@behdad.org> [API] Make hb_font_create() take a face and reference it
/external/harfbuzz_ng/src/hb-ft.cc
fca368c4682624346a0aaee690e1ad6ed4c0b337 22-Apr-2011 Behdad Esfahbod <behdad@behdad.org> Add hb_object_header_t which is the common part of all objects

Makes way for adding arbitrary user_data support.
/external/harfbuzz_ng/src/hb-ft.cc
2409d5f8d7dd8b535ce5ea29e933f7db27d33793 21-Apr-2011 Behdad Esfahbod <behdad@behdad.org> Update Copyright headers
/external/harfbuzz_ng/src/hb-ft.cc
783a7d69696bf0b1502ec9c1495e482e491c78e0 21-Apr-2011 Behdad Esfahbod <behdad@behdad.org> [TODO] Remove finished items
/external/harfbuzz_ng/src/hb-ft.cc
c57d454accff66e5f2c58006e8fb40bc020b6182 21-Apr-2011 Behdad Esfahbod <behdad@behdad.org> Rename all private sources and headers to C++ files

So we can liberally use the simple features of C++ that parts of the
codebase is already using.
/external/harfbuzz_ng/src/hb-ft.cc
cc6d52279d10a2edcf0d86c3a18a79ff4f6d3858 23-Jul-2010 Behdad Esfahbod <behdad@behdad.org> De-C++ where possible

Helps with avoiding many "extern C" declarations in source files.
/external/harfbuzz_ng/src/hb-ft.cc
c442672ec2fb83ed41f3994b3aa4f92a097664ab 24-May-2010 Behdad Esfahbod <behdad@behdad.org> Fix struct initializers
/external/harfbuzz_ng/src/hb-ft.cc
750a2294553d252e28875b605fe61fd9d6696e0f 20-May-2010 Behdad Esfahbod <behdad@behdad.org> get_table() is allowed to return NULL. Use that to simplify code
/external/harfbuzz_ng/src/hb-ft.cc
0a4399ca228d244e646abdb3487da0f13b228889 19-May-2010 Behdad Esfahbod <behdad@behdad.org> Fix scale issues

hb_font_set_scale() now sets the value to be used to represent a unit
pixel. For example, if rendering a 10px font with a 26.6 representation,
you would set scale to (10 << 6). For 10px in 16.16 you would set it to
(10 << 16). This space should be the same space that the get_glyph_metrics
and get_kerning callbacks work in.
/external/harfbuzz_ng/src/hb-ft.cc
22da7fd94d6318c52df69d70470a85464ffc533d 13-May-2010 Behdad Esfahbod <behdad@behdad.org> Rename a few files to be C++ sources

In anticipation for buffer revamp coming.
/external/harfbuzz_ng/src/hb-ft.cc