Page MenuHomePhabricator

evas_object_textblock: add support for variation sequences
Needs ReviewPublic

Authored by ali.alzyod on Wed, May 29, 11:42 PM.

Details

Summary

update font processing to handle variation sequences unicodes to select proper glypg in respect to variation seqences

Test Plan
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Efl.h>
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "");
   elm_win_autodel_set(win, EINA_TRUE);
   textblock = evas_object_textblock_add(win);
   efl_canvas_text_style_set(textblock,NULL,"DEFAULT='font=DejaVuSans font_fallbacks=SamsungColorEmoji color=#000 font_size=20'");
   evas_object_textblock_text_markup_set(textblock, "8&#xfe0f;&#x20E3;&#x262a;&#xfe0f;AAA&#x262a;&#xfe0E;1234567&#xfe0f;&#x20E3;");



   evas_object_size_hint_weight_set(textblock, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(textblock, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(textblock);
   evas_object_move(textblock, 0, 0);
   evas_object_resize(textblock, 320, 320);
   evas_object_resize(win, 320, 320);
   evas_object_show(win);
   elm_run();
   return 0;

}

ELM_MAIN()

Diff Detail

Repository
rEFL core/efl
Branch
arcpatch-D9053_2
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11767
Build 8776: arc lint + arc unit
ali.alzyod created this revision.Wed, May 29, 11:42 PM
ali.alzyod requested review of this revision.Wed, May 29, 11:42 PM
ali.alzyod edited the test plan for this revision. (Show Details)Wed, May 29, 11:55 PM

This Compare Old Vs New Vs Android

old (EFL)

Android

New (EFL)

segfaultxavi requested changes to this revision.Thu, May 30, 1:40 AM
segfaultxavi added subscribers: zmike, segfaultxavi.

I am no expert in Unicode so I cannot comment on the code correctness. The end result looks like very good progress, though.

However, doesn't this patch break API compatibility? The signature for two public (EAPI) methods is being changed: evas_common_get_char_index and evas_common_font_glyph_search.

I think you might need to create new versions of these methods (something like evas_common_get_char_index_with_variant) so apps using the old signature do not break. What do you think @zmike?

This revision now requires changes to proceed.Thu, May 30, 1:40 AM

@segfaultxavi are not these internal APIs ?

segfaultxavi resigned from this revision.Thu, May 30, 1:50 AM

@segfaultxavi are not these internal APIs ?

Oh, I always assume that all EAPI symbols are public, but you are right, this file only seems to be included from _private headers.

I'm sorry for the noise :)

ali.alzyod added a comment.EditedThu, May 30, 1:54 AM

@segfaultxavi You are right, it is confusing to use same signature,
Internal API should have there own signatures to avoid confusing

ali.alzyod requested review of this revision.Thu, May 30, 2:36 AM
cedric requested changes to this revision.Thu, May 30, 9:39 AM

Indeed that seems like a nice improvement. Could you provide us with a patch for our test suite too?

This revision now requires changes to proceed.Thu, May 30, 9:39 AM
ali.alzyod updated this revision to Diff 22625.Thu, May 30, 6:53 PM
  • fix compilation error if harfbuzz was not enabled
ali.alzyod updated this revision to Diff 22628.EditedFri, May 31, 6:21 AM

update test suite with variation sequences
@cedric

This seems good for me. If there would be no more comments in 2 days ~ I'll accept this :)

ali.alzyod updated this revision to Diff 22641.Sun, Jun 2, 5:31 AM
  • Add function comment decleration,Fix caching Issue, Fix searching fonts issue
ali.alzyod updated this revision to Diff 22708.Wed, Jun 12, 6:59 AM

evas_textblock: add support for caching variation sequence

fix binary insertion