scarpe-team / scarpe

Scarpe - shoes but running on webview
Other
162 stars 29 forks source link

TextDrawable improvements #520

Open noahgibbs opened 8 months ago

noahgibbs commented 8 months ago

There are a few styles we don't support for TextDrawable.

We don't look at LinkHover (relevant to links, but not other TextDrawables.)

And we don't support :family, :weight, :rise, :kerning, :emphasis, :stretch, :variant styles.

And the way we use the :font style is actually more like :family -- :font is supposed to be a property you can set to set several other things.

Fixing a style could be a great first issue: pick a property (e.g. rise, kerning or emphasis.) Look it up in the Shoes manual to figure out its type and possible values, and what it does. Figure out how to turn it into CSS. Then in scarpe-components/lib/scarpe/components/calzini/text_drawables.rb, set the CSS style for it when the Shoes style is set. There are a lot of styles that we already do that with.

LinkHover is harder because you can't set a hover rule as inline CSS, so it will probably require doing something with the stylesheet in the empty page. But maybe we could set a CSS variable on the element (called something like hover-color) and have the stylesheet use that as the color when hovering? Something along those lines. I don't think we want to register an onmouseover handler for this, because that could conflict with the TextDrawable registering its own Shoes hover handler (which it's 100% allowed to do.)

imlakshay08 commented 8 months ago

Hey @noahgibbs , I would like to work on this issue. Would you please assign me this please ?

gintama91 commented 8 months ago

hey @imlakshay08 I've assigned u , feel free to hop into discord if u have any questions. or even to just talk.

goodluck.

imlakshay08 commented 8 months ago

@gintama91 . Thank you very much. It would be helpful if could you provide the link to discord ? I cannot find it anywhere.

Pavan-Nambi commented 8 months ago

@imlakshay08 here

imlakshay08 commented 8 months ago

@imlakshay08 here

Thank you.

imlakshay08 commented 8 months ago

Hey @noahgibbs , could I work on other unsupported properties mentioned in issue as well, like :rise and :kerning?

noahgibbs commented 8 months ago

Absolutely. You could open a new issue for that, or just work on them and open a PR :-)

imlakshay08 commented 7 months ago

Hey @noahgibbs , I have made a PR for both rise and kerning. Sorry for being late, been busy due to some personal commitments.

noahgibbs commented 7 months ago

No trouble on late, we're not on any specific schedule :-)