Skip to content

Upgrade to Readium CSS v2 #621

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

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SCRIPTS_PATH := Sources/Navigator/EPUB/Scripts
CSS_PATH := Sources/Navigator/EPUB/Assets/Static/readium-css

help:
@echo "Usage: make <target>\n\n\
Expand Down Expand Up @@ -32,6 +33,15 @@ update-scripts:
@which corepack >/dev/null 2>&1 || (echo "ERROR: corepack is required, please install it first\nhttps://pnpm.io/installation#using-corepack"; exit 1)
pnpm install --dir "$(SCRIPTS_PATH)"

.PHONY: update-css
update-css:
git clone https://github.com/readium/css.git readium-css
rm -rf "$(CSS_PATH)"
cp -r readium-css/css/dist "$(CSS_PATH)"
git -C readium-css rev-parse HEAD > "$(CSS_PATH)/HEAD"
rm -rf readium-css
rm -rf "$(CSS_PATH)/android-fonts-patch"

.PHONY: test
test:
# To limit to a particular test suite: -only-testing:ReadiumSharedTests
Expand Down
1 change: 1 addition & 0 deletions Sources/Navigator/EPUB/Assets/Static/readium-css/HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cb51601207286f2d2b6b50e4e993614673a4c0de
18 changes: 13 additions & 5 deletions Sources/Navigator/EPUB/Assets/Static/readium-css/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Finally, page progression is impacted:
Disabled user settings:

- `hyphens`;
- `word-spacing`;
- `letter-spacing`.

Added user settings:
Expand Down Expand Up @@ -54,8 +53,11 @@ Disabled user settings:
- `text-align`;
- `hyphens`;
- paragraphs’ indent;
- `word-spacing`;
- `letter-spacing`.
- `word-spacing`.

Added user settings:

- hiding/disabling ruby (mapped to `--USER__noRuby: readium-noRuby-on` flag).

### Vertical

Expand Down Expand Up @@ -87,8 +89,11 @@ Disabled user settings:
- `text-align`;
- `hyphens`;
- paragraphs’ indent;
- `word-spacing`;
- `letter-spacing`.
- `word-spacing`.

Added user settings:

- hiding/disabling ruby (mapped to `--USER__noRuby: readium-noRuby-on` flag).

### EBPAJ Polyfill

Expand All @@ -110,3 +115,6 @@ This is currently an edge case as we still have to see whether we want to suppor
- if `mn-Cyrl` is set, then the publication is in cyrillic and it is `horizontal-tb`.
- We don’t currently support the `mn` language, and we can’t rely on system fonts to do so, we’ll have to embed one.

## Android Fonts Patch

See [the specific ReadMe](android-fonts-patch/ReadMe.md) for further information.
Loading