Page MenuHomePhabricator

efl_canvas_text: documentation for style set

Authored by ali.alzyod on Nov 23 2019, 10:11 AM.

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
ali.alzyod created this revision.Nov 23 2019, 10:11 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

ali.alzyod requested review of this revision.Nov 23 2019, 10:11 AM

fix documentation

remove white spaces

This is update for documentation regard efl_text_style_set

segfaultxavi requested changes to this revision.Nov 28 2019, 9:01 AM

Needs rebasing to latest master.

In the comments I request a lot of information and I understand you might not know it. But we must provide it to our users, so we must dig that info up. I assume you know better than me because you have been working on the code, but if it's not the case, I can commandeer the revision.
Please understand that if we are providing a wrapper around fontconfig to isolate the user from it, then we must provide this info or point the user to the relevant fontconfig help page.

When we are done with the comments I can take over and work on the formatting. This is a HUGE piece of documentation which must be formatted correctly to be easily understandable (lists, headers, etc). Unfortunately these docs get converted to different formats so formatting is a hard problem.


I think I prefer attribute rather than command. These do not look like commands to me.


Shouldn't this be "font_fallbacks"? Notice the all-lowercase, the underscore and the ending s. Please double-check that all these strings are correct.


What are the available fonts? Is there a command the user can run to find out this list?


It's "fallbacks" in plural, so I guess this accepts a list? in what format?


What is this "object"?


Is this the full language name ("English)" or some abbreviation ("En")? Does it accept variations ("En_US")?


Is there a list somewhere with all the available color names?


What are the units of these numbers?


What are the units of these numbers?


And what is "backing"?


Can styles by merged? I mean can I enable "shadow" and "glow" at the same time?




What is the size of a line of text? The distance between to lines? The width of the stroke?

Also, what are the units?


A percentage of what?


What is a line gap? What are the units of this number?


Percentage of what?


Can we remove this if it does nothing?


What is this and a percentage of what?





This revision now requires changes to proceed.Nov 28 2019, 9:01 AM
ali.alzyod edited the summary of this revision. (Show Details)Dec 1 2019, 9:45 AM
ali.alzyod updated this revision to Diff 27213.Dec 1 2019, 10:51 AM
ali.alzyod marked 20 inline comments as done.



This is just a description of what attributes we have, there are no underscores.


Using EFL Bindings, we do not have such a feature yet.

In legacy, user could use evas_font_path_global_list


As far as I know it can not. @woohyun ?


It is no lineWidth, it is line-height (In font metric Ascent+Descent), this will not change font size but change Ascent, Descent of the line.


line ascent and descent

ali.alzyod marked 5 inline comments as done.Dec 1 2019, 10:52 AM

close my comments

segfaultxavi requested changes to this revision.Dec 2 2019, 2:09 AM

Thanks for the update. Just a few more questions and I'll take it from here (in a different patch).


Ha ha, very funny. I still don't know what "source" is. Is it a file path? Is it a font name?


OK, from the example, I'll assume "language" must be a 2-letter ISO 639-1 language code.


If the background color is disabled, will the background be transparent?
This is, is backing=off the same as backing=on backing_color=rgba(0,0,0,0)?


Sorry, I still don't understand.
So, a text block has a size of 100x100 pixels. If I set linefill=50%, the lines of text will only fill the left 50 pixels and then wrap to the next line?
Or a single line of text will have a height of 50 pixels?

This revision now requires changes to proceed.Dec 2 2019, 2:09 AM
ali.alzyod marked 2 inline comments as done.Dec 2 2019, 4:07 AM
ali.alzyod added inline comments.



Line fill is interested only about the height of the canvas.

linefill=50% means the line will cover 50% of the canvas space (font size will not change but empty space top and bottom of line will increase ),

In other words,
linefill=50% means canvas will show a maximum of two lines.
linefill=25% means canvas will show maximum of four lines.
linefill=100% means canvas will show maximum of one line.

ali.alzyod marked 3 inline comments as done.Dec 2 2019, 4:40 AM
ali.alzyod marked 3 inline comments as done.Dec 2 2019, 6:13 AM

@segfaultxavi Please let me know if any-more changes are required

segfaultxavi accepted this revision.Dec 2 2019, 9:06 AM

OK! Looks like it contains all the information now. I'll submit another patch later on.
Thanks for your patience!

This revision is now accepted and ready to land.Dec 2 2019, 9:06 AM
This revision was automatically updated to reflect the committed changes.