fix fonts and give 4 options
This commit is contained in:
@@ -16,10 +16,10 @@ Temporary add-ons remain installed until Firefox restarts. For permanent local u
|
||||
|
||||
1. Open a normal web page.
|
||||
2. Select the Glagolify toolbar icon.
|
||||
3. Choose **Round** or **Angular** letter shapes.
|
||||
3. Choose **Round**, **Angular Sans**, **Historical Angular**, or **Missal Angular** letter shapes.
|
||||
4. Press **Enable Glagolitic**. Press **Restore Cyrillic** to undo it.
|
||||
|
||||
The popup keeps one action button and a two-choice letter-style selector. The selected style is stored as a global extension preference and updates every enabled tab immediately. The background script separately owns one absolute enabled/disabled state per tab, broadcasts it to every frame, and supplies both state and style to frames created or navigated later. Tab state lasts across navigation and is discarded when the tab closes. Firefox internal pages (`about:`, browser UI), extension pages, and other protected pages cannot be modified; the popup reports that restriction.
|
||||
The popup keeps one action button and a four-choice letter-style selector. The selected style is stored as a global extension preference and updates every enabled tab immediately. The background script separately owns one absolute enabled/disabled state per tab, broadcasts it to every frame, and supplies both state and style to frames created or navigated later. Tab state lasts across navigation and is discarded when the tab closes. Firefox internal pages (`about:`, browser UI), extension pages, and other protected pages cannot be modified; the popup reports that restriction.
|
||||
|
||||
Glagolify updates existing text and watches for text nodes that are inserted or changed later. It leaves `script`, `style`, `noscript`, `template`, `textarea`, `select`, `option`, effective `contenteditable` regions, and documents in `designMode` untouched. Visible form labels, validation messages, and button text are converted, while text controls and selectable options are not. Textual DOM hidden by HTML, CSS, or `aria-hidden` is converted proactively so it is already Glagolitic if revealed. The implementation only changes text-node data and a reversible inline font fallback; it does not replace or wrap page elements. Disconnected nodes are restored and released after each mutation batch, while nodes moved and reconnected in the same batch keep their state.
|
||||
|
||||
@@ -39,10 +39,14 @@ The mapping uses dedicated Glagolitic letters for `Ё` (Yo), `Й` (I), `Щ` (Sht
|
||||
|
||||
## Bundled fonts
|
||||
|
||||
Glagolify bundles two OFL-licensed fonts so converted characters remain legible and the popup can switch between historical letter shapes:
|
||||
The four selectable styles use two OFL-licensed typefaces:
|
||||
|
||||
- **Round:** [Noto Sans Glagolitic Regular](https://github.com/google/fonts/tree/main/ofl/notosansglagolitic), the standard rounded Unicode Glagolitic design. Its license is `fonts/OFL.txt`.
|
||||
- **Angular:** [Shafarik Regular](https://github.com/google/fonts/tree/main/ofl/shafarik) with OpenType Stylistic Set 3 (`ss03`), which Shafarik defines as Croatian Angular or Square Glagolitic. Its license is `fonts/Shafarik-OFL.txt`.
|
||||
- **Round:** [Shafarik Regular](https://github.com/slavonic/Shafarik)'s standard Unicode Glagolitic glyphs. Its documentation identifies this character set as Round Glagolitic (`Okrugla glagoljica`), modeled on Bulgarian manuscript handwriting from the late 10th through early 12th centuries.
|
||||
- **Angular Sans:** [Noto Sans Glagolitic Regular](https://github.com/google/fonts/tree/main/ofl/notosansglagolitic), a modern sans design with angular letter construction.
|
||||
- **Historical Angular:** Shafarik's OpenType Stylistic Set 3 (`ss03`), identified in its documentation as Croatian Angular or Square Glagolitic.
|
||||
- **Missal Angular:** Shafarik's OpenType Stylistic Set 4 (`ss04`), modeled on Glagolitic used in 15th- and 16th-century printed missals from Kosinj and Venice.
|
||||
|
||||
Shafarik's license is `fonts/Shafarik-OFL.txt`; Noto Sans Glagolitic's license is `fonts/OFL.txt`. The three Shafarik faces use the CSS `size-adjust` font descriptor at 115% to compensate for the typeface's small lowercase Glagolitic body. Noto Sans Glagolitic retains its native metrics.
|
||||
|
||||
The selected font is inserted before each affected element's existing computed font family, so non-Glagolitic characters continue to use the page's own typography. If the page genuinely changes an affected element's inline `font-family` while Glagolify is enabled, the extension retains that latest page-owned declaration, reapplies the selected Glagolitic fallback, and restores the latest page value when switched off.
|
||||
|
||||
@@ -54,4 +58,4 @@ No install or build step is required. With Node.js available, run:
|
||||
npm test
|
||||
```
|
||||
|
||||
The test suite validates the complete 66-entry mapping, mixed-content preservation, case, already-Glagolitic behavior, authoritative per-tab/background frame inheritance, and persisted round/angular font selection using Node's built-in test runner.
|
||||
The test suite validates the complete 66-entry mapping, mixed-content preservation, case, already-Glagolitic behavior, authoritative per-tab/background frame inheritance, and persisted four-style font selection using Node's built-in test runner.
|
||||
|
||||
Reference in New Issue
Block a user