Commit Graph

40 Commits

Author SHA1 Message Date
Christopher Michael cf10c5d487 Evas: Support harfbuzz version checking.
NB: Merged from Tizen to upstream EFL.



SVN revision: 73196
2012-07-03 07:23:17 +00:00
Tom Hacohen a9709c792e Evas font: Support no bidi no shaping mode in font rendering.
For no bidi: just don't set the bidi stuff. I.e paragraph props and the
other stuff (including text_props_direction_set). If you disable BiDi you most
likely want to disable shaping as well.
For no shaping: Disable bidi (i.e don't set direction) and pass
EVAS_TEXT_PROPS_MODE_NONE to info create.

This will prove especially useful for textgrid, but not only.

SVN revision: 72032
2012-06-12 14:14:52 +00:00
Tom Hacohen eca175dbe5 Evas font: Oops, hb_fonts should be per font instance, not source.
SVN revision: 64144
2011-10-18 09:58:49 +00:00
Tom Hacohen 4906d50afc Evas font: Cache Harfbuzz font structure for fonts we use.
SVN revision: 64136
2011-10-17 14:24:49 +00:00
Tom Hacohen 58602fb861 Revert "evas: Deal with harfbuzz API breakage"
Sorry mate, but they broke API without bumping version, that's why I
didn't do this myself. You should probably add your version of harfbuzz.

This reverts commit 64057.

SVN revision: 64134
2011-10-17 12:18:53 +00:00
Mike McCormack 2d4cd8058a evas: Deal with harfbuzz API breakage
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 64057
2011-10-14 02:52:50 +00:00
Tom Hacohen 52302f9664 Evas font: Adjust yet again to the new harfbuzz API.
SVN revision: 63473
2011-09-19 09:17:08 +00:00
Tom Hacohen c2964c42cb Evas font: Adjust to harfbuzz's latest and hopefully last API break.
SVN revision: 62989
2011-08-30 14:38:48 +00:00
Tom Hacohen 422d9358bf Evas font-engine: Conform to the API changes in Harfbuzz 0.6.0.
SVN revision: 59779
2011-05-29 11:09:47 +00:00
Tom Hacohen 81b217f8c4 Evas font-engine: Fixed font fallback in the same script run.
SVN revision: 59777
2011-05-29 09:20:18 +00:00
Tom Hacohen fccfbf78b0 Evas font-engine: Don't search fi again in ot populate.
We already calculate it in content create.

SVN revision: 59498
2011-05-18 11:18:00 +00:00
Tom Hacohen 44b8ca79a4 Evas font-engine: Remove the useless RGBA_Font_Source hb.face.
SVN revision: 59403
2011-05-15 11:59:58 +00:00
Tom Hacohen 726d37b782 Evas font-engine: Adjust code to use latest Harfbuzz (0.5.0)
SVN revision: 59402
2011-05-15 11:59:54 +00:00
Tom Hacohen 5793e609a0 Evas font-engine: Made *_unicode_funcs_get internal to font_ot.c
SVN revision: 59107
2011-05-02 09:27:49 +00:00
Tom Hacohen afac2fdd18 Evas language: Added a character script querying function.
This is added until there will be a library that does it; From my
understanding, there are already people working on such library.

SVN revision: 59100
2011-05-02 07:28:07 +00:00
Tom Hacohen fb511c9dfe Evas language: Fix typos.
SVN revision: 59098
2011-05-02 07:27:59 +00:00
Tom Hacohen 48d0603e5d Evas harfbuzz: Adjust evas to work with Harfbuzz >= 3.0
SVN revision: 58802
2011-04-21 14:04:53 +00:00
Tom Hacohen 543c0cafc0 Evas font-engine: Cache pen position instead of advance.
We only really use adavnce for calculating the pen position, so it makes more
sense to just cache the pen_position instead and calculate advance from
that if ever needed.
This means size/advance calculations are now O(1) because we don't need to
walk the strings anymore.

SVN revision: 58756
2011-04-20 14:20:51 +00:00
Tom Hacohen df5202b2dd Evas font: Iterate with pointers, not indexes.
SVN revision: 57917
2011-03-20 15:05:05 +00:00
Tom Hacohen 0f77f14ccc Evas font-engine: Fixed walking to use ptrs instead of indexes.
I.e walk using a ptr instead of arr[i] all the time. This should make
things faster. Also as part of the change, fixed char_index to be
an offset inside the string object, and not a general offset which was
bad.

SVN revision: 57241
2011-02-22 13:00:02 +00:00
Tom Hacohen 2a2f88aa2c Evas font: Fixed wrong condition that may cause an invalid read when using OT.
SVN revision: 57024
2011-02-14 15:02:52 +00:00
Tom Hacohen 9ed2f6cbc0 Evas font-engine: Added text_len to text_props which fixes
a bug with cursor position and ligatures.

SVN revision: 56983
2011-02-13 12:57:37 +00:00
Tom Hacohen 00b61c9e00 Evas font-ot: Started using our glyph and kerning caches when using Harfbuzz - Major speedups (obviously, only with harfbuzz).
SVN revision: 56644
2011-02-02 08:24:57 +00:00
Tom Hacohen 94b5a536f0 Evas font/textblock/text: Started using string objects instead of
strings in most of the font engine (everywhere except draw).
Haven't removed the paramteres yet, but did mark them as UNUSED.
Removing them will be part of a future change.
Removed run-time OT toggling support, OT is now fast, no need for that.
Renamed all of the intl_props->text_props (because it really changed purpose now)
Fixed spliting/merging of text_props to be fast and good, not hacky and
complex like before.
Note to reviewers: Most of the changes are indentation related, sorry
for the mess, but I had to do it all in one commit, splitting was not
trivial (at least not in retrospect). The important parts are
evas_font_default_walk.x and text_utils.c. query and draw were just
adjusted a bit and the rest were only adjusted to conform to renaming or
were renaming on their own.

SVN revision: 56629
2011-02-01 12:17:52 +00:00
Tom Hacohen cdb54ed92d Revert "Snapshot." - didn't mean to commit this :(
This reverts commit 521198281e4ac616fee48d27aae9e6983d5950c3.

SVN revision: 56556
2011-01-30 13:58:06 +00:00
Tom Hacohen d6feccdebb Snapshot.
SVN revision: 56552
2011-01-30 13:55:04 +00:00
Tom Hacohen a7e2bbabae Evas font: Fixed memory leak when reloading an already-loaded face.
SVN revision: 56538
2011-01-30 10:45:23 +00:00
Tom Hacohen f63e8256ff Evas textblock: Fixed async rendering support.
SVN revision: 56506
2011-01-30 10:41:57 +00:00
Tom Hacohen b46c83aeac Evas textblock: split the visual layouting to two stages:
1. Split to logical layout units.
2. Order the logical layout units in a visual way.
This lets us cache the results of the first part (unless the text changes), which makes everything a lot faster in the OT case, and quite faster in the regular case.
There are still some issues unresolved in this commit that will be resolved in future commits:
1. No support for async rendering - yes, I forgot I'm supposed to support that.
2. native_size should probably be calculated in another way because the current one is slow and if we already have the logical items it should be a piece of cake...

SVN revision: 56504
2011-01-30 10:41:42 +00:00
Tom Hacohen d632d526c0 Split logical layouting and visual layouting completely. There are still some bugs, but this includes the major change.
SVN revision: 56492
2011-01-30 10:40:30 +00:00
Tom Hacohen 48c9b3781e Evas font-engine: A couple of major fixes:
1. Worked around a fribid behavior that broke some stuff - we should handle it better in the future, this workaround is only temporary.
2. Fixed a bug with textblock's last_up_to_pos.
3. Fixed a bug with ot_shaping not reloading the font and activating the size in the wrong place.

SVN revision: 56491
2011-01-30 10:40:21 +00:00
Tom Hacohen 58af440aab Evas font: skip over common script items when getting the font, we should get the font of the actual script items.
SVN revision: 56484
2011-01-30 10:39:42 +00:00
Tom Hacohen 7ce45d8bd4 Revert "Evas font-engine: Also split on script common." - After
reviewing the standard again, it's not really wanted.

This reverts commit 26cc8747fda51e95d340ef1a1838817fe495be23.

SVN revision: 56482
2011-01-30 10:39:29 +00:00
Tom Hacohen 421e1d8ae1 Evas font-engine: Also split on script common.
SVN revision: 56472
2011-01-30 10:38:28 +00:00
Tom Hacohen 9f0ce7a272 Evas textblock + font engine: add an optimized way of doing a cut-off on the text props.
SVN revision: 56470
2011-01-30 10:38:15 +00:00
Tom Hacohen 4ee6706770 Evas font-engine: cache harfbuzz's face.
SVN revision: 56466
2011-01-30 10:37:52 +00:00
Tom Hacohen 48b3a796a5 Evas font-ot: Fixed mistakes that caused ilegal reads.
SVN revision: 56464
2011-01-30 10:37:40 +00:00
Tom Hacohen 63e25655e1 Evas font-ot: renamed internal source_pos to source_cluster and added the forgotten evas_common_font_ot_cluster_size_get to the .h file.
SVN revision: 56463
2011-01-30 10:37:34 +00:00
Tom Hacohen c09000741b Evas font-engine: Add cluster support to the font-engine. Cursor handling is now correct for clusters as well.
SVN revision: 56462
2011-01-30 10:37:29 +00:00
Tom Hacohen ff18fa8399 Evas: Multiple changes that all relate to the Harfbuzz integration:
1. Started feeding Evas_Text_Props to the font engine instead of Evas_BiDi_Props because no we have more general text properties as well - i.e, OpenType stuff.
2. Full Harfbuzz integration which gets compiled in by default (if harfbuzz is present) but only works if the environment variable EVAS_USE_OT is set to 1 (because OT is way slower than regular text rendering).
3. Cleaned the font querying/drawing functions.
4. Added font_shaped function to all of the engines, which by default calls teh harfbuzz stuff (default on linux that is).
5. Moved some source files around a bit to make more sense.

SVN revision: 56455
2011-01-30 10:36:39 +00:00