Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor CSS fixes, add support for .docm #523

Merged
merged 4 commits into from
Jul 16, 2023
Merged

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented Jul 15, 2023

DocX: add support for similar DocM format

koreader/koreader#10599 (comment). Thanks @pkb.
Should allow closing koreader/koreader#10599.

LVStyleSheet: fix LVCssDeclaration::getHash()

Computations could stop too early (when meeting the ASCII char cssd_stop, currently h, ie. in a 'url(aha.png)'), which would have any change after that h goes unnoticed.
Noticed at #514 (comment).

CSS parsing: accept Unicode values for ID and classnames

(We still expect ASCII for element and attribute names.)
Got a French EPUB that has in its CSS (as utf8, shown here read as latin1):

section{
visibility: hidden;
}
section#mentions,
section#préface,
section#lever-de-rideau-avant-propos,
section#actepremier-en-scène-histoire,
section#remerciements { visibility: visible !important; }

which was mostly blank :)
We'll now support #id and .classname made with other chars than ASCII ones.
I hope it won't cause issues with other fancy CSS with other encodings.

update for Harfbuzz 8, fix some compiler warning

hb_font_get_glyph_shape() is deprecated and has been replaced with hb_font_draw_glyph().


This change is Reviewable

pkb and others added 4 commits July 15, 2023 18:55
Computations could stop too early (when meeting the ASCII
char cssd_stop, currently "h", ie. in a 'url(aha.png)'),
which would have any change after that "h" goes unnoticed.
(We still expect ASCII for element and attribute names.)
hb_font_get_glyph_shape() is deprecated and has been
replaced with hb_font_draw_glyph().
@poire-z
Copy link
Contributor Author

poire-z commented Jul 15, 2023

@benoit-pierre @NiLuJe : no real issue, but as you are all high on build and compilers, any idea about the two errors reported by the CI - and how to silence them?

error: 'LVFontGlyphCacheItem' does not refer to a value [clang-diagnostic-error is 2 years old: #450 (comment)

error: Reference to temporary returned. has been here since forever.

@NiLuJe
Copy link
Member

NiLuJe commented Jul 15, 2023

IIRC, it's something related to the fact that LVFontGlyphCacheItem is not a plain struct, it's got functions like a class.

No idea about the second one (both of those look too C++-y for me ;p).

@Frenzie
Copy link
Member

Frenzie commented Jul 15, 2023

Some people have advocated for using emoji classnames as a joke. But it wouldn't necessarily be surprising to see other scripts in any case.

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.

4 participants