Skip to content

Allow editing CSS Font Variants in the text properties docker.

This refactors the way we handle CSS font-variants, so they inherit properly. As well, lager models have been added for the CSS font-variant properties, and they are now editable in the text-property docker.

Keeping this one small for a change.

Test Plan

Test the 5 new "Glyph" entries in the properties dropdown. Also check that the properties are written correctly in the svg source editor.

Ligatures: Most fonts have common ligatures in "Office just", Junicode VF has historical ligatures, Playground Sans has contextual alternates.

Capitals: EB Garamond has both small and petite caps. I can confirm locally that unicase and titling caps work as well.

Numeric: Most modern fonts have fractions and old-style figures, Junicode VF has both Ordinals and Slashed zero. Haven't found a tabular/proportional one yet.

Position: Both EB garamond and Junicode have Super and Subscripts on the numbers.

East Asian: The character has jis78 variants in many CJK fonts. Full-width should work with most CJK fonts, ruby probably requires Japanese Katakana and Hiragana.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?

Merge request reports

Loading