scarpe-team / scarpe

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

Added new Para Styles #532

Closed Nj221102 closed 8 months ago

Nj221102 commented 8 months ago

Description

Added some more para styles like font-variant, font updated some para styles like font-family, emphasis

emphasis wasn't working before because it wasn't mentioned in shoes styles in lacci/lib/shoes/drawables/para.rb font-family was mentioned as font in shoes styles so i changed it to family .

Shoes.app do

    para "this text is in normal styl" , emphasis:"italic"

    para "this text is in italic style" , font: "italic normal bold 16px/1.5 'Times New Roman', serif;"

    para "this text is in oblique style " , family: "'Pacifico', cursive;"

end
Shoes.app do

    para "This is Normal Variant" ,font_variant: "normal"

    para "This is Small Caps Variant " ,font_variant: "small-caps"

  end

Image(if needed, helps for a faster review)

Screenshot 2024-01-30 at 7 26 17 PM Screenshot 2024-01-30 at 7 27 17 PM

Checklist

noahgibbs commented 8 months ago

Mostly this is really good. But it does seem to break the existing font functionality. Example:

Shoes.app do
  para "Text in Helvetica", font: "Helvetica"

  para "And in Lucida", font: "Lucida"

  para "From an example", :font => "Trebuchet 20px bold"
end

I think we're going to need some kind of parsing of the "font" property in Lacci for this.

Nj221102 commented 8 months ago

this branch got a little messed up, I have solved the issue and will make a separate PR after closing this one, sorry if it causes inconvenience @noahgibbs

noahgibbs commented 8 months ago

All good, no trouble!

Nj221102 commented 8 months ago

All good, no trouble!

I have raised the new pull request #534 plz check it out.