Commit Graph

33 Commits

Author SHA1 Message Date
Tom Hacohen 2e71b5ab90 Evas font-engine: Fix glyphs not being drawn.
Thanks to Brian Wang for the report.

This happened because we were querying for the index of the wrong fi,
this became especially visible after we started caching fi.

SVN revision: 59152
2011-05-03 14:36:47 +00:00
Tom Hacohen 61e340ec6c Evas textblock: Now that we cache fi, we don't need shaped_text anymore.
SVN revision: 59131
2011-05-02 15:33:35 +00:00
Tom Hacohen 9d23367627 Evas font-engine: Cache fi for all cases (even without harfbuzz).
This is now possible, because we have a script querying function.

SVN revision: 59109
2011-05-02 09:28:00 +00:00
Tom Hacohen a3e8da3507 Evas font-engine: Fixes last commit to not seg when not using OT.
SVN revision: 58936
2011-04-26 14:20:45 +00:00
Tom Hacohen 476ac636d5 Revert "BAD TASN!". Yeah, I'm evil.
Following commit includes a fix.

This reverts commit 58933.

SVN revision: 58935
2011-04-26 14:20:41 +00:00
Tom Hacohen 8f41c4c125 Evas font-engine: Updated comments.
SVN revision: 58934
2011-04-26 14:20:38 +00:00
Carsten Haitzler 2d2b2d686e BAD TASN!
ROLL BACK TODAYS CHANGES TO EVAS....

SEGV SEGV EVERYWHERE!

*SPANK*



SVN revision: 58933
2011-04-26 14:05:01 +00:00
Tom Hacohen a3c144d2c9 Evas font-engine: fix issue with using the wrong fi.
SVN revision: 58930
2011-04-26 10:21:01 +00:00
Tom Hacohen cb561612f2 Evas font-engine: use the cached fi instead of searching for it.
SVN revision: 58926
2011-04-26 09:26:33 +00:00
Tom Hacohen 9b0005e62a Evas font-engine: Added a fixme.
SVN revision: 58925
2011-04-26 09:14:23 +00:00
Tom Hacohen f0e18f58ff Evas font-engine: Cache fi when using Harfbuzz.
Soon I will also do it for all cases, but it's not possible at the
moment because we depend on harfbuzz for querying unicode properties.

SVN revision: 58924
2011-04-26 09:14:02 +00:00
Tom Hacohen 543a0da0d8 Evas font-engine: Fixed kerning issue and a major rendering bug.
Kerning: We are walking the string visually so we don't need to do
anything special for kerning when in rtl, freetype works with "left" and
"right" which we automatically get.

Rendering bug: Cedric found that in some cases there were missing
characters. This was caused because I forgot to convert the kerning from
16.6 fixed point to int.

SVN revision: 58783
2011-04-21 08:47:16 +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 caa46dc1ba Evas font-engine: Move, rename and make *_text_font_style_match static.
It's only really used (and will ever be used) in a very specific place,
no need to put it in a place that's visible to all the lib.

SVN revision: 58627
2011-04-13 10:55:59 +00:00
Tom Hacohen 1dac813ace Evas font-engine: Fix the fallback fribidi shaper.
Just keep the shaped string in the string object if fribidi is used
without harfbuzz.

SVN revision: 58620
2011-04-13 08:37:01 +00:00
Tom Hacohen ffbe4ed971 Evas font-engine: *text_props_script_set add parameter len.
SVN revision: 58616
2011-04-13 08:36:46 +00:00
Tom Hacohen ad3b167e88 Evas font-engine: Added support for runtime-italic/bold.
Now when setting :style=Oblique/Italic/Cursiva/Bold and etc and there's
no matching font found in the system, adjustments will be done on
runtime to support that feature.

Patch by Myoungwoon Roy Kim (roy_kim).

SVN revision: 58584
2011-04-12 09:05:47 +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 34bf708aae Evas font-engine: Fixed bug with different sizes in Korean text.
I'm still not sure if it's just a workaround that just fixes a symptom
of a bigger issue, or actually needed, but this is good until I figure
this out completely.

SVN revision: 57761
2011-03-15 11:00:29 +00:00
Tom Hacohen e1b714f9a9 Evas font: Draw the replacement char whan the glyph can't be found.
SVN revision: 57097
2011-02-16 16:36:16 +00:00
Tom Hacohen c5ebe60c53 Evas textblock: Improved error message.
SVN revision: 56984
2011-02-13 13:07:37 +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 f0eebf1696 Evas text_utils: make the text_props_content_ref/unref more robust.
Don't allocate a text info if the length is 0. No point in that because
content won't be allocated anyway.

SVN revision: 56924
2011-02-10 15:29:13 +00:00
Tom Hacohen b2029f0648 Evas text_utils: fixed a bug with splitting.
Cutoff is the position in the string, not in the string object.

SVN revision: 56920
2011-02-10 15:02:26 +00:00
Tom Hacohen 2f9d2760ee Evas font-engine: Don't ref/unref info if len==0 because in this case there's no 'info' but the text prop is legal (empty string).
SVN revision: 56746
2011-02-06 08:31:46 +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 34c6617e5a Evas font-engine: add a function to just ref text props.
SVN revision: 56521
2011-01-30 10:43:34 +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 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 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