Page MenuHomePhabricator

efl_canvas_text: documentation for style set
ClosedPublic

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

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ali.alzyod created this revision.Sat, Nov 23, 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: https://phab.enlightenment.org/w/maintainers_reviewers/

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

fix documentation

remove white spaces

@segfaultxavi
This is update for documentation regard efl_text_style_set

segfaultxavi requested changes to this revision.Thu, Nov 28, 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.

src/lib/evas/canvas/efl_canvas_text.eo
85

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

91

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.

132

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

137

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

144

What is this "object"?

185

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

199

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

279

What are the units of these numbers?

287

What are the units of these numbers?

310

And what is "backing"?

316

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

342

Unit?

346

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

Also, what are the units?

351

A percentage of what?

356

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

361

Percentage of what?

366

Can we remove this if it does nothing?

370

What is this and a percentage of what?

387

Units?

391

Units?

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

update

src/lib/evas/canvas/efl_canvas_text.eo
91

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

132

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

In legacy, user could use evas_font_path_global_list

316

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

346

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.

351

line ascent and descent

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

close my comments

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

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

src/lib/evas/canvas/efl_canvas_text.eo
144

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

185

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

310

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)?

370

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.Mon, Dec 2, 2:09 AM
ali.alzyod marked 2 inline comments as done.Mon, Dec 2, 4:07 AM
ali.alzyod added inline comments.
src/lib/evas/canvas/efl_canvas_text.eo
310

Yes

370

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.Mon, Dec 2, 4:40 AM
ali.alzyod marked 3 inline comments as done.Mon, Dec 2, 6:13 AM

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

segfaultxavi accepted this revision.Mon, Dec 2, 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.Mon, Dec 2, 9:06 AM
This revision was automatically updated to reflect the committed changes.