Skip to content

CSS: adds support for font-variant - More FB2 metadata#334

Merged
poire-z merged 2 commits intokoreader:masterfrom
poire-z:font_variant
Mar 19, 2020
Merged

CSS: adds support for font-variant - More FB2 metadata#334
poire-z merged 2 commits intokoreader:masterfrom
poire-z:font_variant

Conversation

@poire-z
Copy link
Copy Markdown
Contributor

@poire-z poire-z commented Mar 18, 2020

CSS: adds support for font-variant
Details around koreader/koreader#5821 (comment)
Most values from CSS-FONTS-3 (31 named-values) are supported, see the code for the list.
Only font-variant and its buddies (font-variant-caps, font-variant-ligatures...) are parsed, but it could be extended to also support font-feature-settings.
https://drafts.csswg.org/css-fonts-3/#propdef-font-variant
https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant
https://en.wikipedia.org/wiki/List_of_typographic_features
https://docs.microsoft.com/en-us/typography/opentype/spec/features_ko#tag-onum

Note that I haven't thought about how font-variant should be handled when we need to use the fallback font - so, the fallback font should have currently no OT feature enabled.

@virxkane @pkb: when/if you pick up this one, you'll have a bit of merging work as it touches lvfntman.cpp, that you have splitted on your side (thought about easing that for you and making it 2 commits, but the split wasn't obvious, and it feels better as a single commit here).

FB2: merge other metadata in returned keywords and description
FB2 has a lot more metadata than other formats, so try to merge and fit them in the 2 available returned metadata slots that weren't used by FB2: Description & Keywords.
Details around koreader/koreader#5956 (comment)


This change is Reviewable

poire-z added 2 commits March 18, 2020 20:51
Also have Harfbuzz full and Harfbuzz light reuse the same
_hb_buffer and _hb_features to keep things simpler.
Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I basically only skimmed through the large lists of features but it all looks sensible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants