foray-commit Mailing List for FOray (Page 10)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2025-05-12 12:29:53
|
Revision: 13653
http://sourceforge.net/p/foray/code/13653
Author: victormote
Date: 2025-05-12 12:29:51 +0000 (Mon, 12 May 2025)
Log Message:
-----------
Conform to aXSL change: Move NaturalBaseline to first-class enum BaselineType.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2025-05-12 09:33:51 UTC (rev 13652)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2025-05-12 12:29:51 UTC (rev 13653)
@@ -29,6 +29,7 @@
package org.foray.common.i18n;
+import org.axsl.i18n.BaselineType;
import org.axsl.i18n.Script;
import org.axsl.unicode.block.U2000_General_Punctuation;
@@ -89,360 +90,360 @@
static {
Script4a.register(new Script4a("Arab", 160, "Arabic", "arabe",
UScript.ARABIC, UnicodeScript.ARABIC,
- Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Armn", 230, "Armenian", "arménien",
UScript.ARMENIAN, UnicodeScript.ARMENIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Bali", 360, "Balinese", "balinais",
UScript.BALINESE, UnicodeScript.BALINESE,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Batk", 365, "Batak", "batak",
UScript.BATAK, UnicodeScript.BATAK,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Beng", 325, "Bengali", "bengalî",
UScript.BENGALI, UnicodeScript.BENGALI,
- Script.NaturalBaseline.HANGING, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.HANGING, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Blis", 550, "Blissymbols", "symboles Bliss",
UScript.BLISSYMBOLS, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Bopo", 285, "Bopomofo", "bopomofo",
UScript.BOPOMOFO, UnicodeScript.BOPOMOFO,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Brah", 300, "Brahmi", "brâhmî",
UScript.BRAHMI, UnicodeScript.BRAHMI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Brai", 570, "Braille", "braille",
UScript.BRAILLE, UnicodeScript.BRAILLE,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Bugi", 367, "Buginese", "bouguis",
UScript.BUGINESE, UnicodeScript.BUGINESE,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Buhd", 372, "Buhid", "bouhide",
UScript.BUHID, UnicodeScript.BUHID,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cans", 440, "Unified Canadian Aboriginal Syllabics",
"syllabaire autochtone canadien unifié",
UScript.CANADIAN_ABORIGINAL, UnicodeScript.CANADIAN_ABORIGINAL,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cari", 201, "Carian", "carien",
UScript.CARIAN, UnicodeScript.CARIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cham", 358, "Cham", "cham (cam, tcham)",
UScript.CHAM, UnicodeScript.CHAM,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cher", 445, "Cherokee", "tchérokî",
UScript.CHEROKEE, UnicodeScript.CHEROKEE,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cirt", 291, "Cirth", "cirth",
UScript.CIRTH, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Copt", 204, "Coptic", "copte",
UScript.COPTIC, UnicodeScript.COPTIC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cprt", 403, "Cypriot", "syllabaire chypriote",
UScript.CYPRIOT, UnicodeScript.CYPRIOT,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cyrl", 220, "Cyrillic", "cyrillique",
UScript.CYRILLIC, Character.UnicodeScript.CYRILLIC,
- Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Cyrs", 221, "Cyrillic (Old Church Slavonic variant)",
"cyrillique (variante slavonne)",
UScript.OLD_CHURCH_SLAVONIC_CYRILLIC, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Deva", 315, "Devanagari (Nagari)", "dévanâgarî",
UScript.DEVANAGARI, UnicodeScript.DEVANAGARI,
- Script.NaturalBaseline.HANGING, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.HANGING, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Dsrt", 250, "Deseret (Mormon)", "déseret (mormon)",
UScript.DESERET, UnicodeScript.DESERET,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Egyd", 070, "Egyptian demotic", "démotique égyptien",
UScript.DEMOTIC_EGYPTIAN, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Egyh", 060, "Egyptian hieratic", "hiératique égyptien",
UScript.HIERATIC_EGYPTIAN, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Egyp", 050, "Egyptian hieroglyphs", "hiéroglyphes égyptiens",
UScript.EGYPTIAN_HIEROGLYPHS,
UnicodeScript.EGYPTIAN_HIEROGLYPHS,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Ethi", 430, "Ethiopic (Geʻez)", "éthiopien (geʻez, guèze)",
UScript.ETHIOPIC, UnicodeScript.ETHIOPIC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Geok", 241, "Khutsuri (Asomtavruli and Nuskhuri)",
"khoutsouri (assomtavrouli et nouskhouri)",
UScript.KHUTSURI, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Geor", 240, "Georgian (Mkhedruli)", "géorgien (mkhédrouli)",
UScript.GEORGIAN, UnicodeScript.GEORGIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Glag", 225, "Glagolitic", "glagolitique",
UScript.GLAGOLITIC, UnicodeScript.GLAGOLITIC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Goth", 206, "Gothic", "gotique",
UScript.GOTHIC, UnicodeScript.GOTHIC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Grek", 200, "Greek", "grec",
UScript.GREEK, UnicodeScript.GREEK,
- Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Gujr", 320, "Gujarati", "goudjarâtî (gujrâtî)",
UScript.GUJARATI, UnicodeScript.GUJARATI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Guru", 310, "Gurmukhi", "gourmoukhî",
UScript.GURMUKHI, UnicodeScript.GURMUKHI,
- Script.NaturalBaseline.HANGING, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.HANGING, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hang", 286, "Hangul (Hangul, Hangeul)", "hangûl (hangul, hangeul)",
UScript.HANGUL, UnicodeScript.HANGUL,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hani", 500, "Han (Hanzi, Kanji, Hanja)", "idéogrammes han",
UScript.HAN, UnicodeScript.HAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hano", 371, "Hanunoo (Hanunóo)", "hanounóo",
UScript.HANUNOO, UnicodeScript.HANUNOO,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hans", 501, "Han (Simplified variant)",
"idéogrammes han (variante simplifiée)",
UScript.SIMPLIFIED_HAN, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hant", 502, "Han (Traditional variant)",
"idéogrammes han (variante traditionnelle)",
UScript.TRADITIONAL_HAN, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hebr", 125, "Hebrew", "hébreu",
UScript.HEBREW, UnicodeScript.HEBREW,
- Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hira", 410, "Hiragana", "hiragana",
UScript.HIRAGANA, UnicodeScript.HIRAGANA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hmng", 450, "Pahawh Hmong", "pahawh hmong",
UScript.PAHAWH_HMONG, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hrkt", 412, "(alias for Hiragana + Katakana)",
"(alias pour hiragana + katakana)",
UScript.KATAKANA_OR_HIRAGANA, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Hung", 176, "Old Hungarian", "ancien hongrois",
UScript.OLD_HUNGARIAN, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Inds", 610, "Indus (Harappan)", "indus",
UScript.HARAPPAN_INDUS, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Ital", 210, "Old Italic (Etruscan, Oscan, etc.)",
"ancien italique (étrusque, osque, etc.)",
UScript.OLD_ITALIC, UnicodeScript.OLD_ITALIC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Java", 361, "Javanese", "javanais",
UScript.JAVANESE, UnicodeScript.JAVANESE,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Jpan", 413, "Japanese (alias for Han + Hiragana + Katakana)",
"japonais (alias pour han + hiragana + katakana)",
UScript.JAPANESE, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Kali", 357, "Kayah Li", "kayah li",
UScript.KAYAH_LI, UnicodeScript.KAYAH_LI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Kana", 411, "Katakana", "katakana",
UScript.KATAKANA, UnicodeScript.KATAKANA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Khar", 305, "Kharoshthi", "kharochthî",
UScript.KHAROSHTHI, UnicodeScript.KHAROSHTHI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Khmr", 355, "Khmer", "khmer",
UScript.KHMER, UnicodeScript.KHMER,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Knda", 345, "Kannada", "kannara (canara)",
UScript.KANNADA, UnicodeScript.KANNADA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Lana", 351, "Lanna", "lanna",
UScript.LANNA, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Laoo", 356, "Lao", "laotien",
UScript.LAO, UnicodeScript.LAO,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Latf", 217, "Latin (Fraktur variant)", "latin (variante brisée)",
UScript.LATIN_FRAKTUR, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Latg", 216, "Latin (Gaelic variant)", "latin (variante gaélique)",
UScript.LATIN_GAELIC, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Latn", 215, "Latin", "latin",
UScript.LATIN, Character.UnicodeScript.LATIN,
- Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
+ BaselineType.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Lepc", 335, "Lepcha (Róng)", "lepcha (róng)",
UScript.LEPCHA, UnicodeScript.LEPCHA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Limb", 336, "Limbu", "limbou",
UScript.LIMBU, UnicodeScript.LIMBU,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Lina", 400, "Linear A", "linéaire A",
UScript.LINEAR_A, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Linb", 401, "Linear B", "linéaire B",
UScript.LINEAR_B, UnicodeScript.LINEAR_B,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Lyci", 202, "Lycian", "lycien",
UScript.LYCIAN, UnicodeScript.LYCIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Lydi", 116, "Lydian", "lydien",
UScript.LYDIAN, UnicodeScript.LYDIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Mand", 140, "Mandaean", "mandéen",
UScript.MANDAEAN, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Maya", 90, "Mayan hieroglyphs", "hiéroglyphes mayas",
UScript.MAYAN_HIEROGLYPHS, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Mero", 100, "Meroitic", "méroïtique",
UScript.MEROITIC, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Mlym", 347, "Malayalam", "malayâlam",
UScript.MALAYALAM, UnicodeScript.MALAYALAM,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Mong", 145, "Mongolian", "mongol",
UScript.MONGOLIAN, UnicodeScript.MONGOLIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Moon", 218, "Moon (Moon code, Moon script, Moon type)", "écriture Moon",
UScript.MOON, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Mtei", 337, "Meitei Mayek (Meithei, Meetei)", "meitei mayek",
UScript.MEITEI_MAYEK, UnicodeScript.MEETEI_MAYEK,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Mymr", 350, "Myanmar (Burmese)", "birman",
UScript.MYANMAR, UnicodeScript.MYANMAR,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Nkoo", 165, "N’Ko", "n’ko",
UScript.NKO, UnicodeScript.NKO,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Ogam", 212, "Ogham", "ogam",
UScript.OGHAM, UnicodeScript.OGHAM,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Olck", 261, "Ol Chiki (Ol Cemet’, Ol, Santali)", "ol tchiki",
UScript.OL_CHIKI, UnicodeScript.OL_CHIKI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Orkh", 175, "Orkhon", "orkhon",
UScript.ORKHON, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Orya", 327, "Oriya", "oriyâ",
UScript.ORIYA, UnicodeScript.ORIYA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Osma", 260, "Osmanya", "osmanais",
UScript.OSMANYA, UnicodeScript.OSMANYA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Perm", 227, "Old Permic", "ancien permien",
UScript.OLD_PERMIC, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Phag", 331, "Phags-pa", "’phags pa",
UScript.PHAGS_PA, UnicodeScript.PHAGS_PA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Phnx", 115, "Phoenician", "phénicien",
UScript.PHOENICIAN, UnicodeScript.PHOENICIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Plrd", 282, "Pollard Phonetic", "phonétique de Pollard",
UScript.PHONETIC_POLLARD, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Rjng", 363, "Rejang, Redjang, Kaganga", "redjang",
UScript.REJANG, UnicodeScript.REJANG,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Roro", 620, "Rongorongo", "rongorongo",
UScript.RONGORONGO, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Runr", 211, "Runic", "runique",
UScript.RUNIC, UnicodeScript.RUNIC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Sara", 292, "Sarati", "sarati",
UScript.SARATI, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Saur", 344, "Saurashtra", "saurachtra",
UScript.SAURASHTRA, UnicodeScript.SAURASHTRA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Sgnw", 95, "SignWriting", "SignÉcriture, SignWriting",
UScript.SIGN_WRITING, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Shaw", 281, "Shavian (Shaw)", "shavien (Shaw)",
UScript.SHAVIAN, UnicodeScript.SHAVIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Sinh", 348, "Sinhala", "singhalais",
UScript.SINHALA, UnicodeScript.SINHALA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Sund", 362, "Sundanese", "sundanais",
UScript.SUNDANESE, UnicodeScript.SUNDANESE,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Sylo", 316, "Syloti Nagri", "sylotî nâgrî",
UScript.SYLOTI_NAGRI, UnicodeScript.SYLOTI_NAGRI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Syrc", 135, "Syriac", "syriaque",
UScript.SYRIAC, UnicodeScript.SYRIAC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Syre", 138, "Syriac (Estrangelo variant)",
"syriaque (variante estranghélo)",
UScript.ESTRANGELO_SYRIAC, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Syrj", 137, "Syriac (Western variant)",
"syriaque (variante occidentale)",
UScript.WESTERN_SYRIAC, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Syrn", 136, "Syriac (Eastern variant)", "syriaque (variante orientale)",
UScript.EASTERN_SYRIAC, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Tagb", 373, "Tagbanwa", "tagbanoua",
UScript.TAGBANWA, UnicodeScript.TAGBANWA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Tale", 353, "Tai Le", "taï-le",
- UScript.TAI_LE, UnicodeScript.TAI_LE, Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ UScript.TAI_LE, UnicodeScript.TAI_LE, null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Talu", 354, "New Tai Lue", "nouveau taï-lue",
UScript.NEW_TAI_LUE, UnicodeScript.NEW_TAI_LUE,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Taml", 346, "Tamil", "tamoul",
UScript.TAMIL, UnicodeScript.TAMIL,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Telu", 340, "Telugu", "télougou",
UScript.TELUGU, UnicodeScript.TELUGU,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Teng", 290, "Tengwar", "tengwar",
UScript.TENGWAR, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Tfng", 120, "Tifinagh (Berber)", "tifinagh (berbère)",
UScript.TIFINAGH, UnicodeScript.TIFINAGH,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Tglg", 370, "Tagalog", "tagal",
UScript.TAGALOG, UnicodeScript.TAGALOG,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Thaa", 170, "Thaana", "thâna",
UScript.THAANA, UnicodeScript.THAANA,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Thai", 352, "Thai", "thaï",
UScript.THAI, UnicodeScript.THAI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Tibt", 330, "Tibetan", "tibétain",
UScript.TIBETAN, UnicodeScript.TIBETAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Ugar", 040, "Ugaritic", "ougaritique",
UScript.UGARITIC, UnicodeScript.UGARITIC,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Zyyy", 998, "Code for undetermined script",
"codet pour écriture indéterminée", ICU4J_NOT_SUPPORTED, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Vaii", 470, "Vai", "vaï",
UScript.VAI, UnicodeScript.VAI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Visp", 280, "Visible Speech", "parole visible",
UScript.VISIBLE_SPEECH, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Xpeo", 030, "Old Persian", "cunéiforme persépolitain",
UScript.OLD_PERSIAN, UnicodeScript.OLD_PERSIAN,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Xsux", 020, "Cuneiform, Sumero-Akkadian", "cunéiforme suméro-akkadien",
UScript.CUNEIFORM, UnicodeScript.CUNEIFORM,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Yiii", 460, "Yi", "yi",
UScript.YI, UnicodeScript.YI,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Zxxx", 997, "Code for unwritten languages",
"codet pour les langues non écrites",
UScript.UNWRITTEN_LANGUAGES, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
Script4a.register(new Script4a("Zzzz", 999, "Code for uncoded script", "codet pour écriture non codée",
ICU4J_NOT_SUPPORTED, null,
- Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ null, DEFAULT_HYPHENATION_CHAR));
UNDETERMINED = Script4a.findFromAlpha("Zyyy");
LATIN = Script4a.findFromAlpha("Latn");
@@ -470,7 +471,7 @@
private UnicodeScript unicodeScript;
/** The natural baseline for this script. */
- private Script.NaturalBaseline naturalBaseline;
+ private BaselineType naturalBaseline;
/** The hyphenation char(s) for this script. */
private String hyphenationChar;
@@ -492,7 +493,7 @@
* @param hyphenationChar The hyphenation char(s) used by this script.
*/
public Script4a(final String alpha, final int numeric, final String englishName, final String frenchName,
- final int icu4jCode, final UnicodeScript unicodeScript, final Script.NaturalBaseline naturalBaseline,
+ final int icu4jCode, final UnicodeScript unicodeScript, final BaselineType naturalBaseline,
final String hyphenationChar) {
if (! matchesPattern(alpha)) {
final String template = "Alpha expected pattern: " + PATTERN.toString() + ", actual: %s";
@@ -708,7 +709,7 @@
/** Please note that no effort has been made to ensure that this method returns the correct value for each
* script. */
@Override
- public NaturalBaseline getNaturalBaseline() {
+ public BaselineType getNaturalBaseline() {
return this.naturalBaseline;
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java 2025-05-12 09:33:51 UTC (rev 13652)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java 2025-05-12 12:29:51 UTC (rev 13653)
@@ -28,8 +28,6 @@
package org.foray.common.i18n;
-import org.axsl.i18n.Script;
-
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;
@@ -68,7 +66,7 @@
public void invalidPatternTest() {
try {
new Script4a("VULCA", (short) -999, "VulcanScript", "VulcánScript", (byte) -1, null,
- Script.NaturalBaseline.UNKNOWN, "-");
+ null, "-");
fail("Expected " + IllegalArgumentException.class.getName());
} catch (final IllegalArgumentException e) {
/* This is the expected case. Do nothing. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-12 09:33:54
|
Revision: 13652
http://sourceforge.net/p/foray/code/13652
Author: victormote
Date: 2025-05-12 09:33:51 +0000 (Mon, 12 May 2025)
Log Message:
-----------
Style issues only.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2025-05-11 12:50:51 UTC (rev 13651)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2025-05-12 09:33:51 UTC (rev 13652)
@@ -33,6 +33,7 @@
import org.axsl.unicode.block.U2000_General_Punctuation;
import com.ibm.icu.lang.UScript;
+import org.checkerframework.checker.signedness.qual.Unsigned;
import java.lang.Character.UnicodeScript;
import java.util.HashMap;
@@ -61,8 +62,8 @@
/** The Greek script. */
public static final Script4a GREEK;
- /** Constant return value for {@link #getIcu4jCode()}. */
- private static final byte ICU4J_NOT_SUPPORTED = -2;
+ /** Constant return value for {@link #getIcu4jCode()} when there is no mapping. */
+ private static final int ICU4J_NOT_SUPPORTED = -2;
/** Regular expression pattern for matching a script code. Although BCP 47 recommends a pattern of [A-Z][a-z]{3},
* it also indicates that the language tag components are case-insensitive. */
@@ -86,360 +87,360 @@
/* Checkstyle: Allow Magic Numbers that are hard-coded data. */
static {
- Script4a.register(new Script4a("Arab", (short) 160, "Arabic", "arabe",
- (byte) UScript.ARABIC, UnicodeScript.ARABIC,
+ Script4a.register(new Script4a("Arab", 160, "Arabic", "arabe",
+ UScript.ARABIC, UnicodeScript.ARABIC,
Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Armn", (short) 230, "Armenian", "arménien",
- (byte) UScript.ARMENIAN, UnicodeScript.ARMENIAN,
+ Script4a.register(new Script4a("Armn", 230, "Armenian", "arménien",
+ UScript.ARMENIAN, UnicodeScript.ARMENIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Bali", (short) 360, "Balinese", "balinais",
- (byte) UScript.BALINESE, UnicodeScript.BALINESE,
+ Script4a.register(new Script4a("Bali", 360, "Balinese", "balinais",
+ UScript.BALINESE, UnicodeScript.BALINESE,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Batk", (short) 365, "Batak", "batak",
- (byte) UScript.BATAK, UnicodeScript.BATAK,
+ Script4a.register(new Script4a("Batk", 365, "Batak", "batak",
+ UScript.BATAK, UnicodeScript.BATAK,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Beng", (short) 325, "Bengali", "bengalî",
- (byte) UScript.BENGALI, UnicodeScript.BENGALI,
+ Script4a.register(new Script4a("Beng", 325, "Bengali", "bengalî",
+ UScript.BENGALI, UnicodeScript.BENGALI,
Script.NaturalBaseline.HANGING, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Blis", (short) 550, "Blissymbols", "symboles Bliss",
- (byte) UScript.BLISSYMBOLS, null,
+ Script4a.register(new Script4a("Blis", 550, "Blissymbols", "symboles Bliss",
+ UScript.BLISSYMBOLS, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Bopo", (short) 285, "Bopomofo", "bopomofo",
- (byte) UScript.BOPOMOFO, UnicodeScript.BOPOMOFO,
+ Script4a.register(new Script4a("Bopo", 285, "Bopomofo", "bopomofo",
+ UScript.BOPOMOFO, UnicodeScript.BOPOMOFO,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Brah", (short) 300, "Brahmi", "brâhmî",
- (byte) UScript.BRAHMI, UnicodeScript.BRAHMI,
+ Script4a.register(new Script4a("Brah", 300, "Brahmi", "brâhmî",
+ UScript.BRAHMI, UnicodeScript.BRAHMI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Brai", (short) 570, "Braille", "braille",
- (byte) UScript.BRAILLE, UnicodeScript.BRAILLE,
+ Script4a.register(new Script4a("Brai", 570, "Braille", "braille",
+ UScript.BRAILLE, UnicodeScript.BRAILLE,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Bugi", (short) 367, "Buginese", "bouguis",
- (byte) UScript.BUGINESE, UnicodeScript.BUGINESE,
+ Script4a.register(new Script4a("Bugi", 367, "Buginese", "bouguis",
+ UScript.BUGINESE, UnicodeScript.BUGINESE,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Buhd", (short) 372, "Buhid", "bouhide",
- (byte) UScript.BUHID, UnicodeScript.BUHID,
+ Script4a.register(new Script4a("Buhd", 372, "Buhid", "bouhide",
+ UScript.BUHID, UnicodeScript.BUHID,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cans", (short) 440, "Unified Canadian Aboriginal Syllabics",
+ Script4a.register(new Script4a("Cans", 440, "Unified Canadian Aboriginal Syllabics",
"syllabaire autochtone canadien unifié",
- (byte) UScript.CANADIAN_ABORIGINAL, UnicodeScript.CANADIAN_ABORIGINAL,
+ UScript.CANADIAN_ABORIGINAL, UnicodeScript.CANADIAN_ABORIGINAL,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cari", (short) 201, "Carian", "carien",
- (byte) UScript.CARIAN, UnicodeScript.CARIAN,
+ Script4a.register(new Script4a("Cari", 201, "Carian", "carien",
+ UScript.CARIAN, UnicodeScript.CARIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cham", (short) 358, "Cham", "cham (cam, tcham)",
- (byte) UScript.CHAM, UnicodeScript.CHAM,
+ Script4a.register(new Script4a("Cham", 358, "Cham", "cham (cam, tcham)",
+ UScript.CHAM, UnicodeScript.CHAM,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cher", (short) 445, "Cherokee", "tchérokî",
- (byte) UScript.CHEROKEE, UnicodeScript.CHEROKEE,
+ Script4a.register(new Script4a("Cher", 445, "Cherokee", "tchérokî",
+ UScript.CHEROKEE, UnicodeScript.CHEROKEE,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cirt", (short) 291, "Cirth", "cirth",
- (byte) UScript.CIRTH, null,
+ Script4a.register(new Script4a("Cirt", 291, "Cirth", "cirth",
+ UScript.CIRTH, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Copt", (short) 204, "Coptic", "copte",
- (byte) UScript.COPTIC, UnicodeScript.COPTIC,
+ Script4a.register(new Script4a("Copt", 204, "Coptic", "copte",
+ UScript.COPTIC, UnicodeScript.COPTIC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cprt", (short) 403, "Cypriot", "syllabaire chypriote",
- (byte) UScript.CYPRIOT, UnicodeScript.CYPRIOT,
+ Script4a.register(new Script4a("Cprt", 403, "Cypriot", "syllabaire chypriote",
+ UScript.CYPRIOT, UnicodeScript.CYPRIOT,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cyrl", (short) 220, "Cyrillic", "cyrillique",
- (byte) UScript.CYRILLIC, Character.UnicodeScript.CYRILLIC,
+ Script4a.register(new Script4a("Cyrl", 220, "Cyrillic", "cyrillique",
+ UScript.CYRILLIC, Character.UnicodeScript.CYRILLIC,
Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Cyrs", (short) 221, "Cyrillic (Old Church Slavonic variant)",
+ Script4a.register(new Script4a("Cyrs", 221, "Cyrillic (Old Church Slavonic variant)",
"cyrillique (variante slavonne)",
- (byte) UScript.OLD_CHURCH_SLAVONIC_CYRILLIC, null,
+ UScript.OLD_CHURCH_SLAVONIC_CYRILLIC, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Deva", (short) 315, "Devanagari (Nagari)", "dévanâgarî",
- (byte) UScript.DEVANAGARI, UnicodeScript.DEVANAGARI,
+ Script4a.register(new Script4a("Deva", 315, "Devanagari (Nagari)", "dévanâgarî",
+ UScript.DEVANAGARI, UnicodeScript.DEVANAGARI,
Script.NaturalBaseline.HANGING, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Dsrt", (short) 250, "Deseret (Mormon)", "déseret (mormon)",
- (byte) UScript.DESERET, UnicodeScript.DESERET,
+ Script4a.register(new Script4a("Dsrt", 250, "Deseret (Mormon)", "déseret (mormon)",
+ UScript.DESERET, UnicodeScript.DESERET,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Egyd", (short) 070, "Egyptian demotic", "démotique égyptien",
- (byte) UScript.DEMOTIC_EGYPTIAN, null,
+ Script4a.register(new Script4a("Egyd", 070, "Egyptian demotic", "démotique égyptien",
+ UScript.DEMOTIC_EGYPTIAN, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Egyh", (short) 060, "Egyptian hieratic", "hiératique égyptien",
- (byte) UScript.HIERATIC_EGYPTIAN, null,
+ Script4a.register(new Script4a("Egyh", 060, "Egyptian hieratic", "hiératique égyptien",
+ UScript.HIERATIC_EGYPTIAN, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Egyp", (short) 050, "Egyptian hieroglyphs", "hiéroglyphes égyptiens",
- (byte) UScript.EGYPTIAN_HIEROGLYPHS,
+ Script4a.register(new Script4a("Egyp", 050, "Egyptian hieroglyphs", "hiéroglyphes égyptiens",
+ UScript.EGYPTIAN_HIEROGLYPHS,
UnicodeScript.EGYPTIAN_HIEROGLYPHS,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Ethi", (short) 430, "Ethiopic (Geʻez)", "éthiopien (geʻez, guèze)",
- (byte) UScript.ETHIOPIC, UnicodeScript.ETHIOPIC,
+ Script4a.register(new Script4a("Ethi", 430, "Ethiopic (Geʻez)", "éthiopien (geʻez, guèze)",
+ UScript.ETHIOPIC, UnicodeScript.ETHIOPIC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Geok", (short) 241, "Khutsuri (Asomtavruli and Nuskhuri)",
+ Script4a.register(new Script4a("Geok", 241, "Khutsuri (Asomtavruli and Nuskhuri)",
"khoutsouri (assomtavrouli et nouskhouri)",
- (byte) UScript.KHUTSURI, null,
+ UScript.KHUTSURI, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Geor", (short) 240, "Georgian (Mkhedruli)", "géorgien (mkhédrouli)",
- (byte) UScript.GEORGIAN, UnicodeScript.GEORGIAN,
+ Script4a.register(new Script4a("Geor", 240, "Georgian (Mkhedruli)", "géorgien (mkhédrouli)",
+ UScript.GEORGIAN, UnicodeScript.GEORGIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Glag", (short) 225, "Glagolitic", "glagolitique",
- (byte) UScript.GLAGOLITIC, UnicodeScript.GLAGOLITIC,
+ Script4a.register(new Script4a("Glag", 225, "Glagolitic", "glagolitique",
+ UScript.GLAGOLITIC, UnicodeScript.GLAGOLITIC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Goth", (short) 206, "Gothic", "gotique",
- (byte) UScript.GOTHIC, UnicodeScript.GOTHIC,
+ Script4a.register(new Script4a("Goth", 206, "Gothic", "gotique",
+ UScript.GOTHIC, UnicodeScript.GOTHIC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Grek", (short) 200, "Greek", "grec",
- (byte) UScript.GREEK, UnicodeScript.GREEK,
+ Script4a.register(new Script4a("Grek", 200, "Greek", "grec",
+ UScript.GREEK, UnicodeScript.GREEK,
Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Gujr", (short) 320, "Gujarati", "goudjarâtî (gujrâtî)",
- (byte) UScript.GUJARATI, UnicodeScript.GUJARATI,
+ Script4a.register(new Script4a("Gujr", 320, "Gujarati", "goudjarâtî (gujrâtî)",
+ UScript.GUJARATI, UnicodeScript.GUJARATI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Guru", (short) 310, "Gurmukhi", "gourmoukhî",
- (byte) UScript.GURMUKHI, UnicodeScript.GURMUKHI,
+ Script4a.register(new Script4a("Guru", 310, "Gurmukhi", "gourmoukhî",
+ UScript.GURMUKHI, UnicodeScript.GURMUKHI,
Script.NaturalBaseline.HANGING, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hang", (short) 286, "Hangul (Hangul, Hangeul)", "hangûl (hangul, hangeul)",
- (byte) UScript.HANGUL, UnicodeScript.HANGUL,
+ Script4a.register(new Script4a("Hang", 286, "Hangul (Hangul, Hangeul)", "hangûl (hangul, hangeul)",
+ UScript.HANGUL, UnicodeScript.HANGUL,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hani", (short) 500, "Han (Hanzi, Kanji, Hanja)", "idéogrammes han",
- (byte) UScript.HAN, UnicodeScript.HAN,
+ Script4a.register(new Script4a("Hani", 500, "Han (Hanzi, Kanji, Hanja)", "idéogrammes han",
+ UScript.HAN, UnicodeScript.HAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hano", (short) 371, "Hanunoo (Hanunóo)", "hanounóo",
- (byte) UScript.HANUNOO, UnicodeScript.HANUNOO,
+ Script4a.register(new Script4a("Hano", 371, "Hanunoo (Hanunóo)", "hanounóo",
+ UScript.HANUNOO, UnicodeScript.HANUNOO,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hans", (short) 501, "Han (Simplified variant)",
+ Script4a.register(new Script4a("Hans", 501, "Han (Simplified variant)",
"idéogrammes han (variante simplifiée)",
- (byte) UScript.SIMPLIFIED_HAN, null,
+ UScript.SIMPLIFIED_HAN, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hant", (short) 502, "Han (Traditional variant)",
+ Script4a.register(new Script4a("Hant", 502, "Han (Traditional variant)",
"idéogrammes han (variante traditionnelle)",
- (byte) UScript.TRADITIONAL_HAN, null,
+ UScript.TRADITIONAL_HAN, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hebr", (short) 125, "Hebrew", "hébreu",
- (byte) UScript.HEBREW, UnicodeScript.HEBREW,
+ Script4a.register(new Script4a("Hebr", 125, "Hebrew", "hébreu",
+ UScript.HEBREW, UnicodeScript.HEBREW,
Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hira", (short) 410, "Hiragana", "hiragana",
- (byte) UScript.HIRAGANA, UnicodeScript.HIRAGANA,
+ Script4a.register(new Script4a("Hira", 410, "Hiragana", "hiragana",
+ UScript.HIRAGANA, UnicodeScript.HIRAGANA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hmng", (short) 450, "Pahawh Hmong", "pahawh hmong",
- (byte) UScript.PAHAWH_HMONG, null,
+ Script4a.register(new Script4a("Hmng", 450, "Pahawh Hmong", "pahawh hmong",
+ UScript.PAHAWH_HMONG, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hrkt", (short) 412, "(alias for Hiragana + Katakana)",
+ Script4a.register(new Script4a("Hrkt", 412, "(alias for Hiragana + Katakana)",
"(alias pour hiragana + katakana)",
- (byte) UScript.KATAKANA_OR_HIRAGANA, null,
+ UScript.KATAKANA_OR_HIRAGANA, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Hung", (short) 176, "Old Hungarian", "ancien hongrois",
- (byte) UScript.OLD_HUNGARIAN, null,
+ Script4a.register(new Script4a("Hung", 176, "Old Hungarian", "ancien hongrois",
+ UScript.OLD_HUNGARIAN, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Inds", (short) 610, "Indus (Harappan)", "indus",
- (byte) UScript.HARAPPAN_INDUS, null,
+ Script4a.register(new Script4a("Inds", 610, "Indus (Harappan)", "indus",
+ UScript.HARAPPAN_INDUS, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Ital", (short) 210, "Old Italic (Etruscan, Oscan, etc.)",
+ Script4a.register(new Script4a("Ital", 210, "Old Italic (Etruscan, Oscan, etc.)",
"ancien italique (étrusque, osque, etc.)",
- (byte) UScript.OLD_ITALIC, UnicodeScript.OLD_ITALIC,
+ UScript.OLD_ITALIC, UnicodeScript.OLD_ITALIC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Java", (short) 361, "Javanese", "javanais",
- (byte) UScript.JAVANESE, UnicodeScript.JAVANESE,
+ Script4a.register(new Script4a("Java", 361, "Javanese", "javanais",
+ UScript.JAVANESE, UnicodeScript.JAVANESE,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Jpan", (short) 413, "Japanese (alias for Han + Hiragana + Katakana)",
+ Script4a.register(new Script4a("Jpan", 413, "Japanese (alias for Han + Hiragana + Katakana)",
"japonais (alias pour han + hiragana + katakana)",
- (byte) UScript.JAPANESE, null,
+ UScript.JAPANESE, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Kali", (short) 357, "Kayah Li", "kayah li",
- (byte) UScript.KAYAH_LI, UnicodeScript.KAYAH_LI,
+ Script4a.register(new Script4a("Kali", 357, "Kayah Li", "kayah li",
+ UScript.KAYAH_LI, UnicodeScript.KAYAH_LI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Kana", (short) 411, "Katakana", "katakana",
- (byte) UScript.KATAKANA, UnicodeScript.KATAKANA,
+ Script4a.register(new Script4a("Kana", 411, "Katakana", "katakana",
+ UScript.KATAKANA, UnicodeScript.KATAKANA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Khar", (short) 305, "Kharoshthi", "kharochthî",
- (byte) UScript.KHAROSHTHI, UnicodeScript.KHAROSHTHI,
+ Script4a.register(new Script4a("Khar", 305, "Kharoshthi", "kharochthî",
+ UScript.KHAROSHTHI, UnicodeScript.KHAROSHTHI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Khmr", (short) 355, "Khmer", "khmer",
- (byte) UScript.KHMER, UnicodeScript.KHMER,
+ Script4a.register(new Script4a("Khmr", 355, "Khmer", "khmer",
+ UScript.KHMER, UnicodeScript.KHMER,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Knda", (short) 345, "Kannada", "kannara (canara)",
- (byte) UScript.KANNADA, UnicodeScript.KANNADA,
+ Script4a.register(new Script4a("Knda", 345, "Kannada", "kannara (canara)",
+ UScript.KANNADA, UnicodeScript.KANNADA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Lana", (short) 351, "Lanna", "lanna",
- (byte) UScript.LANNA, null,
+ Script4a.register(new Script4a("Lana", 351, "Lanna", "lanna",
+ UScript.LANNA, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Laoo", (short) 356, "Lao", "laotien",
- (byte) UScript.LAO, UnicodeScript.LAO,
+ Script4a.register(new Script4a("Laoo", 356, "Lao", "laotien",
+ UScript.LAO, UnicodeScript.LAO,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Latf", (short) 217, "Latin (Fraktur variant)", "latin (variante brisée)",
- (byte) UScript.LATIN_FRAKTUR, null,
+ Script4a.register(new Script4a("Latf", 217, "Latin (Fraktur variant)", "latin (variante brisée)",
+ UScript.LATIN_FRAKTUR, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Latg", (short) 216, "Latin (Gaelic variant)", "latin (variante gaélique)",
- (byte) UScript.LATIN_GAELIC, null,
+ Script4a.register(new Script4a("Latg", 216, "Latin (Gaelic variant)", "latin (variante gaélique)",
+ UScript.LATIN_GAELIC, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Latn", (short) 215, "Latin", "latin",
- (byte) UScript.LATIN, Character.UnicodeScript.LATIN,
+ Script4a.register(new Script4a("Latn", 215, "Latin", "latin",
+ UScript.LATIN, Character.UnicodeScript.LATIN,
Script.NaturalBaseline.ALPHABETIC, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Lepc", (short) 335, "Lepcha (Róng)", "lepcha (róng)",
- (byte) UScript.LEPCHA, UnicodeScript.LEPCHA,
+ Script4a.register(new Script4a("Lepc", 335, "Lepcha (Róng)", "lepcha (róng)",
+ UScript.LEPCHA, UnicodeScript.LEPCHA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Limb", (short) 336, "Limbu", "limbou",
- (byte) UScript.LIMBU, UnicodeScript.LIMBU,
+ Script4a.register(new Script4a("Limb", 336, "Limbu", "limbou",
+ UScript.LIMBU, UnicodeScript.LIMBU,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Lina", (short) 400, "Linear A", "linéaire A",
- (byte) UScript.LINEAR_A, null,
+ Script4a.register(new Script4a("Lina", 400, "Linear A", "linéaire A",
+ UScript.LINEAR_A, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Linb", (short) 401, "Linear B", "linéaire B",
- (byte) UScript.LINEAR_B, UnicodeScript.LINEAR_B,
+ Script4a.register(new Script4a("Linb", 401, "Linear B", "linéaire B",
+ UScript.LINEAR_B, UnicodeScript.LINEAR_B,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Lyci", (short) 202, "Lycian", "lycien",
- (byte) UScript.LYCIAN, UnicodeScript.LYCIAN,
+ Script4a.register(new Script4a("Lyci", 202, "Lycian", "lycien",
+ UScript.LYCIAN, UnicodeScript.LYCIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Lydi", (short) 116, "Lydian", "lydien",
- (byte) UScript.LYDIAN, UnicodeScript.LYDIAN,
+ Script4a.register(new Script4a("Lydi", 116, "Lydian", "lydien",
+ UScript.LYDIAN, UnicodeScript.LYDIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Mand", (short) 140, "Mandaean", "mandéen",
- (byte) UScript.MANDAEAN, null,
+ Script4a.register(new Script4a("Mand", 140, "Mandaean", "mandéen",
+ UScript.MANDAEAN, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Maya", (short) 90, "Mayan hieroglyphs", "hiéroglyphes mayas",
- (byte) UScript.MAYAN_HIEROGLYPHS, null,
+ Script4a.register(new Script4a("Maya", 90, "Mayan hieroglyphs", "hiéroglyphes mayas",
+ UScript.MAYAN_HIEROGLYPHS, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Mero", (short) 100, "Meroitic", "méroïtique",
- (byte) UScript.MEROITIC, null,
+ Script4a.register(new Script4a("Mero", 100, "Meroitic", "méroïtique",
+ UScript.MEROITIC, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Mlym", (short) 347, "Malayalam", "malayâlam",
- (byte) UScript.MALAYALAM, UnicodeScript.MALAYALAM,
+ Script4a.register(new Script4a("Mlym", 347, "Malayalam", "malayâlam",
+ UScript.MALAYALAM, UnicodeScript.MALAYALAM,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Mong", (short) 145, "Mongolian", "mongol",
- (byte) UScript.MONGOLIAN, UnicodeScript.MONGOLIAN,
+ Script4a.register(new Script4a("Mong", 145, "Mongolian", "mongol",
+ UScript.MONGOLIAN, UnicodeScript.MONGOLIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Moon", (short) 218, "Moon (Moon code, Moon script, Moon type)", "écriture Moon",
- (byte) UScript.MOON, null,
+ Script4a.register(new Script4a("Moon", 218, "Moon (Moon code, Moon script, Moon type)", "écriture Moon",
+ UScript.MOON, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Mtei", (short) 337, "Meitei Mayek (Meithei, Meetei)", "meitei mayek",
- (byte) UScript.MEITEI_MAYEK, UnicodeScript.MEETEI_MAYEK,
+ Script4a.register(new Script4a("Mtei", 337, "Meitei Mayek (Meithei, Meetei)", "meitei mayek",
+ UScript.MEITEI_MAYEK, UnicodeScript.MEETEI_MAYEK,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Mymr", (short) 350, "Myanmar (Burmese)", "birman",
- (byte) UScript.MYANMAR, UnicodeScript.MYANMAR,
+ Script4a.register(new Script4a("Mymr", 350, "Myanmar (Burmese)", "birman",
+ UScript.MYANMAR, UnicodeScript.MYANMAR,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Nkoo", (short) 165, "N’Ko", "n’ko",
- (byte) UScript.NKO, UnicodeScript.NKO,
+ Script4a.register(new Script4a("Nkoo", 165, "N’Ko", "n’ko",
+ UScript.NKO, UnicodeScript.NKO,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Ogam", (short) 212, "Ogham", "ogam",
- (byte) UScript.OGHAM, UnicodeScript.OGHAM,
+ Script4a.register(new Script4a("Ogam", 212, "Ogham", "ogam",
+ UScript.OGHAM, UnicodeScript.OGHAM,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Olck", (short) 261, "Ol Chiki (Ol Cemet’, Ol, Santali)", "ol tchiki",
- (byte) UScript.OL_CHIKI, UnicodeScript.OL_CHIKI,
+ Script4a.register(new Script4a("Olck", 261, "Ol Chiki (Ol Cemet’, Ol, Santali)", "ol tchiki",
+ UScript.OL_CHIKI, UnicodeScript.OL_CHIKI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Orkh", (short) 175, "Orkhon", "orkhon",
- (byte) UScript.ORKHON, null,
+ Script4a.register(new Script4a("Orkh", 175, "Orkhon", "orkhon",
+ UScript.ORKHON, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Orya", (short) 327, "Oriya", "oriyâ",
- (byte) UScript.ORIYA, UnicodeScript.ORIYA,
+ Script4a.register(new Script4a("Orya", 327, "Oriya", "oriyâ",
+ UScript.ORIYA, UnicodeScript.ORIYA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Osma", (short) 260, "Osmanya", "osmanais",
- (byte) UScript.OSMANYA, UnicodeScript.OSMANYA,
+ Script4a.register(new Script4a("Osma", 260, "Osmanya", "osmanais",
+ UScript.OSMANYA, UnicodeScript.OSMANYA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Perm", (short) 227, "Old Permic", "ancien permien",
- (byte) UScript.OLD_PERMIC, null,
+ Script4a.register(new Script4a("Perm", 227, "Old Permic", "ancien permien",
+ UScript.OLD_PERMIC, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Phag", (short) 331, "Phags-pa", "’phags pa",
- (byte) UScript.PHAGS_PA, UnicodeScript.PHAGS_PA,
+ Script4a.register(new Script4a("Phag", 331, "Phags-pa", "’phags pa",
+ UScript.PHAGS_PA, UnicodeScript.PHAGS_PA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Phnx", (short) 115, "Phoenician", "phénicien",
- (byte) UScript.PHOENICIAN, UnicodeScript.PHOENICIAN,
+ Script4a.register(new Script4a("Phnx", 115, "Phoenician", "phénicien",
+ UScript.PHOENICIAN, UnicodeScript.PHOENICIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Plrd", (short) 282, "Pollard Phonetic", "phonétique de Pollard",
- (byte) UScript.PHONETIC_POLLARD, null,
+ Script4a.register(new Script4a("Plrd", 282, "Pollard Phonetic", "phonétique de Pollard",
+ UScript.PHONETIC_POLLARD, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Rjng", (short) 363, "Rejang, Redjang, Kaganga", "redjang",
- (byte) UScript.REJANG, UnicodeScript.REJANG,
+ Script4a.register(new Script4a("Rjng", 363, "Rejang, Redjang, Kaganga", "redjang",
+ UScript.REJANG, UnicodeScript.REJANG,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Roro", (short) 620, "Rongorongo", "rongorongo",
- (byte) UScript.RONGORONGO, null,
+ Script4a.register(new Script4a("Roro", 620, "Rongorongo", "rongorongo",
+ UScript.RONGORONGO, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Runr", (short) 211, "Runic", "runique",
- (byte) UScript.RUNIC, UnicodeScript.RUNIC,
+ Script4a.register(new Script4a("Runr", 211, "Runic", "runique",
+ UScript.RUNIC, UnicodeScript.RUNIC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Sara", (short) 292, "Sarati", "sarati",
- (byte) UScript.SARATI, null,
+ Script4a.register(new Script4a("Sara", 292, "Sarati", "sarati",
+ UScript.SARATI, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Saur", (short) 344, "Saurashtra", "saurachtra",
- (byte) UScript.SAURASHTRA, UnicodeScript.SAURASHTRA,
+ Script4a.register(new Script4a("Saur", 344, "Saurashtra", "saurachtra",
+ UScript.SAURASHTRA, UnicodeScript.SAURASHTRA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Sgnw", (short) 95, "SignWriting", "SignÉcriture, SignWriting",
- (byte) UScript.SIGN_WRITING, null,
+ Script4a.register(new Script4a("Sgnw", 95, "SignWriting", "SignÉcriture, SignWriting",
+ UScript.SIGN_WRITING, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Shaw", (short) 281, "Shavian (Shaw)", "shavien (Shaw)",
- (byte) UScript.SHAVIAN, UnicodeScript.SHAVIAN,
+ Script4a.register(new Script4a("Shaw", 281, "Shavian (Shaw)", "shavien (Shaw)",
+ UScript.SHAVIAN, UnicodeScript.SHAVIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Sinh", (short) 348, "Sinhala", "singhalais",
- (byte) UScript.SINHALA, UnicodeScript.SINHALA,
+ Script4a.register(new Script4a("Sinh", 348, "Sinhala", "singhalais",
+ UScript.SINHALA, UnicodeScript.SINHALA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Sund", (short) 362, "Sundanese", "sundanais",
- (byte) UScript.SUNDANESE, UnicodeScript.SUNDANESE,
+ Script4a.register(new Script4a("Sund", 362, "Sundanese", "sundanais",
+ UScript.SUNDANESE, UnicodeScript.SUNDANESE,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Sylo", (short) 316, "Syloti Nagri", "sylotî nâgrî",
- (byte) UScript.SYLOTI_NAGRI, UnicodeScript.SYLOTI_NAGRI,
+ Script4a.register(new Script4a("Sylo", 316, "Syloti Nagri", "sylotî nâgrî",
+ UScript.SYLOTI_NAGRI, UnicodeScript.SYLOTI_NAGRI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Syrc", (short) 135, "Syriac", "syriaque",
- (byte) UScript.SYRIAC, UnicodeScript.SYRIAC,
+ Script4a.register(new Script4a("Syrc", 135, "Syriac", "syriaque",
+ UScript.SYRIAC, UnicodeScript.SYRIAC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Syre", (short) 138, "Syriac (Estrangelo variant)",
+ Script4a.register(new Script4a("Syre", 138, "Syriac (Estrangelo variant)",
"syriaque (variante estranghélo)",
- (byte) UScript.ESTRANGELO_SYRIAC, null,
+ UScript.ESTRANGELO_SYRIAC, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Syrj", (short) 137, "Syriac (Western variant)",
+ Script4a.register(new Script4a("Syrj", 137, "Syriac (Western variant)",
"syriaque (variante occidentale)",
- (byte) UScript.WESTERN_SYRIAC, null,
+ UScript.WESTERN_SYRIAC, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Syrn", (short) 136, "Syriac (Eastern variant)", "syriaque (variante orientale)",
- (byte) UScript.EASTERN_SYRIAC, null,
+ Script4a.register(new Script4a("Syrn", 136, "Syriac (Eastern variant)", "syriaque (variante orientale)",
+ UScript.EASTERN_SYRIAC, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Tagb", (short) 373, "Tagbanwa", "tagbanoua",
- (byte) UScript.TAGBANWA, UnicodeScript.TAGBANWA,
+ Script4a.register(new Script4a("Tagb", 373, "Tagbanwa", "tagbanoua",
+ UScript.TAGBANWA, UnicodeScript.TAGBANWA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Tale", (short) 353, "Tai Le", "taï-le",
- (byte) UScript.TAI_LE, UnicodeScript.TAI_LE, Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Talu", (short) 354, "New Tai Lue", "nouveau taï-lue",
- (byte) UScript.NEW_TAI_LUE, UnicodeScript.NEW_TAI_LUE,
+ Script4a.register(new Script4a("Tale", 353, "Tai Le", "taï-le",
+ UScript.TAI_LE, UnicodeScript.TAI_LE, Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
+ Script4a.register(new Script4a("Talu", 354, "New Tai Lue", "nouveau taï-lue",
+ UScript.NEW_TAI_LUE, UnicodeScript.NEW_TAI_LUE,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Taml", (short) 346, "Tamil", "tamoul",
- (byte) UScript.TAMIL, UnicodeScript.TAMIL,
+ Script4a.register(new Script4a("Taml", 346, "Tamil", "tamoul",
+ UScript.TAMIL, UnicodeScript.TAMIL,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Telu", (short) 340, "Telugu", "télougou",
- (byte) UScript.TELUGU, UnicodeScript.TELUGU,
+ Script4a.register(new Script4a("Telu", 340, "Telugu", "télougou",
+ UScript.TELUGU, UnicodeScript.TELUGU,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Teng", (short) 290, "Tengwar", "tengwar",
- (byte) UScript.TENGWAR, null,
+ Script4a.register(new Script4a("Teng", 290, "Tengwar", "tengwar",
+ UScript.TENGWAR, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Tfng", (short) 120, "Tifinagh (Berber)", "tifinagh (berbère)",
- (byte) UScript.TIFINAGH, UnicodeScript.TIFINAGH,
+ Script4a.register(new Script4a("Tfng", 120, "Tifinagh (Berber)", "tifinagh (berbère)",
+ UScript.TIFINAGH, UnicodeScript.TIFINAGH,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Tglg", (short) 370, "Tagalog", "tagal",
- (byte) UScript.TAGALOG, UnicodeScript.TAGALOG,
+ Script4a.register(new Script4a("Tglg", 370, "Tagalog", "tagal",
+ UScript.TAGALOG, UnicodeScript.TAGALOG,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Thaa", (short) 170, "Thaana", "thâna",
- (byte) UScript.THAANA, UnicodeScript.THAANA,
+ Script4a.register(new Script4a("Thaa", 170, "Thaana", "thâna",
+ UScript.THAANA, UnicodeScript.THAANA,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Thai", (short) 352, "Thai", "thaï",
- (byte) UScript.THAI, UnicodeScript.THAI,
+ Script4a.register(new Script4a("Thai", 352, "Thai", "thaï",
+ UScript.THAI, UnicodeScript.THAI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Tibt", (short) 330, "Tibetan", "tibétain",
- (byte) UScript.TIBETAN, UnicodeScript.TIBETAN,
+ Script4a.register(new Script4a("Tibt", 330, "Tibetan", "tibétain",
+ UScript.TIBETAN, UnicodeScript.TIBETAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Ugar", (short) 040, "Ugaritic", "ougaritique",
- (byte) UScript.UGARITIC, UnicodeScript.UGARITIC,
+ Script4a.register(new Script4a("Ugar", 040, "Ugaritic", "ougaritique",
+ UScript.UGARITIC, UnicodeScript.UGARITIC,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Zyyy", (short) 998, "Code for undetermined script",
+ Script4a.register(new Script4a("Zyyy", 998, "Code for undetermined script",
"codet pour écriture indéterminée", ICU4J_NOT_SUPPORTED, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Vaii", (short) 470, "Vai", "vaï",
- (byte) UScript.VAI, UnicodeScript.VAI,
+ Script4a.register(new Script4a("Vaii", 470, "Vai", "vaï",
+ UScript.VAI, UnicodeScript.VAI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Visp", (short) 280, "Visible Speech", "parole visible",
- (byte) UScript.VISIBLE_SPEECH, null,
+ Script4a.register(new Script4a("Visp", 280, "Visible Speech", "parole visible",
+ UScript.VISIBLE_SPEECH, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Xpeo", (short) 030, "Old Persian", "cunéiforme persépolitain",
- (byte) UScript.OLD_PERSIAN, UnicodeScript.OLD_PERSIAN,
+ Script4a.register(new Script4a("Xpeo", 030, "Old Persian", "cunéiforme persépolitain",
+ UScript.OLD_PERSIAN, UnicodeScript.OLD_PERSIAN,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Xsux", (short) 020, "Cuneiform, Sumero-Akkadian", "cunéiforme suméro-akkadien",
- (byte) UScript.CUNEIFORM, UnicodeScript.CUNEIFORM,
+ Script4a.register(new Script4a("Xsux", 020, "Cuneiform, Sumero-Akkadian", "cunéiforme suméro-akkadien",
+ UScript.CUNEIFORM, UnicodeScript.CUNEIFORM,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Yiii", (short) 460, "Yi", "yi",
- (byte) UScript.YI, UnicodeScript.YI,
+ Script4a.register(new Script4a("Yiii", 460, "Yi", "yi",
+ UScript.YI, UnicodeScript.YI,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Zxxx", (short) 997, "Code for unwritten languages",
+ Script4a.register(new Script4a("Zxxx", 997, "Code for unwritten languages",
"codet pour les langues non écrites",
- (byte) UScript.UNWRITTEN_LANGUAGES, null,
+ UScript.UNWRITTEN_LANGUAGES, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
- Script4a.register(new Script4a("Zzzz", (short) 999, "Code for uncoded script", "codet pour écriture non codée",
+ Script4a.register(new Script4a("Zzzz", 999, "Code for uncoded script", "codet pour écriture non codée",
ICU4J_NOT_SUPPORTED, null,
Script.NaturalBaseline.UNKNOWN, DEFAULT_HYPHENATION_CHAR));
@@ -460,10 +461,10 @@
private String alphaCode;
/** The ISO-15924 numeric code for this script. */
- private short numericCode;
+ private @Unsigned short numericCode;
/** The ICU4J code for this script. */
- private byte icu4jCode;
+ private @Unsigned byte icu4jCode;
/** The Unicode script corresponding to this ISO-15924 script. */
private UnicodeScript unicodeScript;
@@ -490,8 +491,8 @@
* @param naturalBaseline The natural baseline used by this script.
* @param hyphenationChar The hyphenation char(s) used by this script.
*/
- public Script4a(final String alpha, final short numeric, final String englishName, final String frenchName,
- final byte icu4jCode, final UnicodeScript unicodeScript, final Script.NaturalBaseline naturalBaseline,
+ public Script4a(final String alpha, final int numeric, final String englishName, final String frenchName,
+ final int icu4jCode, final UnicodeScript unicodeScript, final Script.NaturalBaseline naturalBaseline,
final String hyphenationChar) {
if (! matchesPattern(alpha)) {
final String template = "Alpha expected pattern: " + PATTERN.toString() + ", actual: %s";
@@ -498,10 +499,10 @@
throw new IllegalArgumentException(String.format(template, alpha));
}
this.alphaCode = alpha;
- this.numericCode = numeric;
+ this.numericCode = (@Unsigned short) numeric;
this.englishName = englishName;
this.frenchName = frenchName;
- this.icu4jCode = icu4jCode;
+ this.icu4jCode = (@Unsigned byte) icu4jCode;
this.unicodeScript = unicodeScript;
this.naturalBaseline = naturalBaseline;
this.hyphenationChar = hyphenationChar;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java 2025-05-11 12:50:51 UTC (rev 13651)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java 2025-05-12 09:33:51 UTC (rev 13652)
@@ -57,11 +57,8 @@
}
@Override
- public BaseScriptTableHandler startScriptTable() {
- final ParserKit<BaseScriptTable, BaseScriptTableHandler> handler =
- BaseScriptTable.createContentHandler();
- this.table.scriptTables.add(handler.getTable());
- return handler.getHandler();
+ public void baseTagCount(final short value) {
+ this.table.tags = new ArrayList<String>(value);
}
@Override
@@ -70,19 +67,21 @@
}
@Override
- public void baseScriptTag(final String value) {
- this.table.scriptTags.add(value);
+ public void baseScriptCount(final short value) {
+ this.table.scriptTags = new ArrayList<String>(value);
+ this.table.scriptTables = new ArrayList<BaseScriptTable>(value);
}
@Override
- public void baseTagCount(final short value) {
- this.table.tags = new ArrayList<String>(value);
+ public void baseScriptTag(final String value) {
+ this.table.scriptTags.add(value);
}
@Override
- public void baseScriptCount(final short value) {
- this.table.scriptTags = new ArrayList<String>(value);
- this.table.scriptTables = new ArrayList<BaseScriptTable>(value);
+ public BaseScriptTableHandler startScriptTable() {
+ final ParserKit<BaseScriptTable, BaseScriptTableHandler> handler = BaseScriptTable.createContentHandler();
+ this.table.scriptTables.add(handler.getTable());
+ return handler.getHandler();
}
}
@@ -93,7 +92,7 @@
/** The list of script tags for this Axis. This should have the same size as {@link #scriptTables}. */
private List<String> scriptTags;
- /** The list of script tables for this Axis. This should have the same size as {@link #scripts}. */
+ /** The list of script tables for this Axis. This should have the same size as {@link #scriptTags}. */
private List<BaseScriptTable> scriptTables;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-11 12:51:02
|
Revision: 13651
http://sourceforge.net/p/foray/code/13651
Author: victormote
Date: 2025-05-11 12:50:51 +0000 (Sun, 11 May 2025)
Log Message:
-----------
Add classes to parse the "meta" table.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/TrueTypeFontHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TrueTypeFontParser.java
Added Paths:
-----------
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/MetaTable.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MetaTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/MetaTableParser.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java 2025-05-10 22:51:20 UTC (rev 13650)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java 2025-05-11 12:50:51 UTC (rev 13651)
@@ -50,6 +50,7 @@
import org.foray.font.ttf.table.LocaTable;
import org.foray.font.ttf.table.MathTable;
import org.foray.font.ttf.table.MaxpTable;
+import org.foray.font.ttf.table.MetaTable;
import org.foray.font.ttf.table.NameTable;
import org.foray.font.ttf.table.Os2Table;
import org.foray.font.ttf.table.PcltTable;
@@ -76,6 +77,7 @@
import org.foray.fontParse.ttf.handler.LocaTableHandler;
import org.foray.fontParse.ttf.handler.MathTableHandler;
import org.foray.fontParse.ttf.handler.MaxpTableHandler;
+import org.foray.fontParse.ttf.handler.MetaTableHandler;
import org.foray.fontParse.ttf.handler.NameTableHandler;
import org.foray.fontParse.ttf.handler.Os2TableHandler;
import org.foray.fontParse.ttf.handler.PcltTableHandler;
@@ -383,6 +385,16 @@
}
return null;
}
+
+ @Override
+ public MetaTableHandler startMetaTable() {
+ if (this.font.metaTable == null) {
+ final ParserKit<MetaTable, MetaTableHandler> kit = MetaTable.createContentHandler();
+ this.font.metaTable = kit.getTable();
+ return kit.getHandler();
+ }
+ return null;
+ }
}
@@ -474,6 +486,9 @@
/** The (optional) "PCLT" table instance. */
private PcltTable pcltTable = null;
+ /** The (optional) "meta" table instance. */
+ private MetaTable metaTable = null;
+
/** The font file containing this font. */
private TrueTypeContainer container;
@@ -709,6 +724,14 @@
}
/**
+ * Returns the "meta" table.
+ * @return The "meta" table.
+ */
+ public MetaTable getMetaTable() {
+ return this.metaTable;
+ }
+
+ /**
* Converts a TrueType Funits value to millipoints, based on the "unitsPerEm" field in the "head" table.
* Note that no consideration of font size is used here: the returned value is scaled to 1 point.
* Multiply the returned value by the font size, in points, to get the number of millipoints scaled to that size.
Added: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/MetaTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/MetaTable.java (rev 0)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/MetaTable.java 2025-05-11 12:50:51 UTC (rev 13651)
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2025 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.font.ttf.table;
+
+import org.foray.common.i18n.WritingSystem4a;
+import org.foray.font.ttf.ParserKit;
+import org.foray.font.ttf.RoTable;
+import org.foray.fontParse.ttf.handler.MetaTableHandler;
+
+import org.axsl.i18n.Script;
+
+import org.checkerframework.checker.signedness.qual.Unsigned;
+
+/**
+ * An OpenType "meta" (Metadata) table.
+ */
+public class MetaTable extends RoTable {
+
+ /**
+ * The handler of events from the parser.
+ */
+ private final class ContentHandler implements MetaTableHandler {
+
+ /** The table instance being created. */
+ @SuppressWarnings("unused")
+ private MetaTable table;
+
+ /** Index to the current dlng item being parsed. */
+ private int dlngIndex = -1;
+
+ /** Index to the current dlng item being parsed. */
+ private int slngIndex = -1;
+
+ /**
+ * Constructor.
+ * @param table The table instance being created.
+ */
+ private ContentHandler(final MetaTable table) {
+ this.table = table;
+ }
+
+ @Override
+ public void dlngCount(final @Unsigned int value) {
+ this.table.designWritingSystems = new WritingSystem4a[value];
+ }
+
+ @Override
+ public void slngCount(final @Unsigned int value) {
+ this.table.supportedWritingSystems = new WritingSystem4a[value];
+ }
+
+ @Override
+ public void dlng(final String value) {
+ this.dlngIndex ++;
+ this.table.designWritingSystems[this.dlngIndex] = WritingSystem4a.find(value);
+ }
+
+ @Override
+ public void slng(final String value) {
+ this.slngIndex ++;
+ this.table.supportedWritingSystems[this.slngIndex] = WritingSystem4a.find(value);
+ }
+ }
+
+
+
+
+
+
+
+ /** The writing systems (called ScriptLangTag in the TrueType documentation) for which the font was primarily
+ * designed. */
+ private WritingSystem4a[] designWritingSystems;
+
+ /** The writing systems (called ScriptLangTag in the TrueType documentation) for which the font declares itself to
+ * be capable of supporting. */
+ private WritingSystem4a[] supportedWritingSystems;
+
+ /**
+ * Creates a table instance and a content handler for that instance.
+ * @return A new content handler.
+ */
+ public static ParserKit<MetaTable, MetaTableHandler> createContentHandler() {
+ final MetaTable table = new MetaTable();
+ final MetaTableHandler handler = table.new ContentHandler(table);
+ return new ParserKit<MetaTable, MetaTableHandler>(table, handler);
+ }
+
+ /**
+ * Indicates whether this font was designed for a given script.
+ * @param script The script being tested.
+ * @return True if and only if this font declares that it was designed for {@code script}.
+ */
+ public boolean isDesignedFor(final Script script) {
+ for (int index = 0; index < this.designWritingSystems.length; index ++) {
+ final WritingSystem4a writingSystem = this.designWritingSystems[index];
+ if (writingSystem.getScript().equals(script)) {
+ return true;
+ }
+ }
+ /* Although all fonts designed for a script also support that script, the inverse is not true. */
+ return false;
+ }
+
+ /**
+ * Indicates whether this font is capable of supporting a given script.
+ * This is a lower standard than what is reported in {@link #isDesignedFor(Script)}, and, if the script is not
+ * true there, indicates that this font might be used as a fallback font for the script.
+ * @param script The script being tested.
+ * @return True if and only if this font declares that it can support {@code script}.
+ */
+ public boolean canSupport(final Script script) {
+ for (int index = 0; index < this.supportedWritingSystems.length; index ++) {
+ final WritingSystem4a writingSystem = this.supportedWritingSystems[index];
+ if (writingSystem.getScript().equals(script)) {
+ return true;
+ }
+ }
+ /* All fonts designed for a script also support that script. Check there in case the font author did not mark it
+ * so. */
+ return isDesignedFor(script);
+ }
+
+}
Property changes on: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/MetaTable.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MetaTableHandler.java
===================================================================
--- trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MetaTableHandler.java (rev 0)
+++ trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MetaTableHandler.java 2025-05-11 12:50:51 UTC (rev 13651)
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2025 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fontParse.ttf.handler;
+
+import org.foray.fontParse.FontContentHandler;
+import org.foray.fontParse.ttf.parser.MetaTableParser;
+
+import org.checkerframework.checker.signedness.qual.Unsigned;
+
+/**
+ * Implementations catch and handle the output from {@link MetaTableParser}.
+ */
+public interface MetaTableHandler extends FontContentHandler {
+
+ default void version(final @Unsigned int value) { return; }
+ default void flags(final @Unsigned int value) { return; }
+ default void dataMapsCount(final @Unsigned int value) { return; }
+
+ default void tag(final String value) { return; }
+ default void dataOffset(final @Unsigned int value) { return; }
+ default void dataLength(final @Unsigned int value) { return; }
+
+ default void ignoredCount(final @Unsigned int value) { return; }
+ default void dlngCount(final @Unsigned int value) { return; }
+ default void slngCount(final @Unsigned int value) { return; }
+ default void otherCount(final @Unsigned int value) { return; }
+
+ default void dlng(final String value) { return; }
+ default void slng(final String value) { return; }
+ default void otherTag(final byte[] value) { return; }
+}
Property changes on: trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MetaTableHandler.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/TrueTypeFontHandler.java
===================================================================
--- trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/TrueTypeFontHandler.java 2025-05-10 22:51:20 UTC (rev 13650)
+++ trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/TrueTypeFontHandler.java 2025-05-11 12:50:51 UTC (rev 13651)
@@ -68,4 +68,5 @@
default MathTableHandler startMathTable() { return null; }
default PcltTableHandler startPcltTable() { return null; }
default KernTableHandler startKernTable() { return null; }
+ default MetaTableHandler startMetaTable() { return null; }
}
Added: trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/MetaTableParser.java
===================================================================
--- trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/MetaTableParser.java (rev 0)
+++ trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/MetaTableParser.java 2025-05-11 12:50:51 UTC (rev 13651)
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2025 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fontParse.ttf.parser;
+
+import org.foray.fontParse.TableParser;
+import org.foray.fontParse.ttf.handler.MetaTableHandler;
+
+import org.checkerframework.checker.signedness.qual.Unsigned;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Parses a TTF "meta" table.
+ */
+public class MetaTableParser extends TableParser<MetaTableHandler> {
+
+
+ @Override
+ public void parse(final TtfRandomAccessInput input, final int offset, final MetaTableHandler handler)
+ throws IOException {
+ input.seek(offset);
+
+ /* Parse the MetaHeader. */
+ handler.version(input.read_uint32()); // 4 bytes, total 4
+ handler.flags(input.read_uint32()); // 4 bytes, total 8
+ input.skipBytes(TtfType.uint32.getQtyBytes()); // 4 bytes, total 12
+ final @Unsigned int dataMapsCount = input.read_uint32(); // 4 bytes, total 16
+ handler.dataMapsCount(dataMapsCount);
+
+ /* Parse and store the DataMap records, so that we can provide counts
+ * of the individual tags before sending the data. */
+ final String[] tags = new String[dataMapsCount];
+ final @Unsigned int[] dataOffsets = new @Unsigned int[dataMapsCount];
+ final @Unsigned int[] dataLengths = new @Unsigned int[dataMapsCount];
+ for (int index = 0; index < dataMapsCount; index ++) {
+ final String tag = input.read_Tag(); // 4 bytes @, total 4
+ handler.tag(tag);
+ tags[index] = tag;
+
+ final @Unsigned int dataOffset = input.read_uint32(); // 4 bytes @, total 8
+ handler.dataOffset(dataOffset);
+ dataOffsets[index] = dataOffset;
+
+ final @Unsigned int dataLength = input.read_uint32(); // 4 bytes @, total 12
+ handler.dataLength(dataLength);
+ dataLengths[index] = dataLength;
+ }
+
+ /* Count each tag and report the results.
+ * This extra step allows the handler to size data structures properly. */
+ int ignoredCount = 0;
+ int dlngCount = 0;
+ int slngCount = 0;
+ int otherCount = 0;
+ for (int index = 0; index < dataMapsCount; index ++) {
+ final String tag = tags[index];
+ switch (tag) {
+ case "appl": ignoredCount ++; break;
+ case "bild": ignoredCount ++; break;
+ case "dlng": dlngCount ++; break;
+ case "slng": slngCount ++; break;
+ default: otherCount ++; break;
+ }
+ }
+ handler.ignoredCount(ignoredCount);
+ handler.dlngCount(dlngCount);
+ handler.slngCount(slngCount);
+ handler.otherCount(otherCount);
+
+
+ /* Now read the tags. */
+ for (int index = 0; index < dataMapsCount; index ++) {
+ input.seek(offset + dataOffsets[index]);
+
+ switch (tags[index]) {
+ case "dlng": handler.dlng(input.readString(dataLengths[index], StandardCharsets.US_ASCII)); break;
+ case "slng": handler.slng(input.readString(dataLengths[index], StandardCharsets.US_ASCII)); break;
+ default: {
+ final byte[] bytes = new byte[dataLengths[index]];
+ input.readFully(bytes);
+ handler.otherTag(bytes);
+ }
+ }
+ }
+ }
+
+}
Property changes on: trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/MetaTableParser.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TrueTypeFontParser.java
===================================================================
--- trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TrueTypeFontParser.java 2025-05-10 22:51:20 UTC (rev 13650)
+++ trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TrueTypeFontParser.java 2025-05-11 12:50:51 UTC (rev 13651)
@@ -48,6 +48,7 @@
import org.foray.fontParse.ttf.handler.LocaTableHandler;
import org.foray.fontParse.ttf.handler.MathTableHandler;
import org.foray.fontParse.ttf.handler.MaxpTableHandler;
+import org.foray.fontParse.ttf.handler.MetaTableHandler;
import org.foray.fontParse.ttf.handler.NameTableHandler;
import org.foray.fontParse.ttf.handler.Os2TableHandler;
import org.foray.fontParse.ttf.handler.PcltTableHandler;
@@ -417,6 +418,17 @@
}
}
+ {
+ final int tableOffset = handler.getTableOffset("meta");
+ if (tableOffset > -1) {
+ final MetaTableHandler tableHandler = handler.startMetaTable();
+ if (tableHandler != null) {
+ final MetaTableParser tableParser = new MetaTableParser();
+ tableParser.parse(input, tableOffset, tableHandler);
+ }
+ }
+ }
+
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-10 22:51:38
|
Revision: 13650
http://sourceforge.net/p/foray/code/13650
Author: victormote
Date: 2025-05-10 22:51:20 +0000 (Sat, 10 May 2025)
Log Message:
-----------
Rename packages for clarity and future expansion.
Modified Paths:
--------------
trunk/foray/foray-00-dev/config/checkstyle/checkstyle-suppressions.xml
trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontContent.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TableDirectory.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeCollection.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeSingle.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtcHeader.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtfSubSetFile.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseCoordTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseMinMaxTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseScriptTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseValuesTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cff2Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CffTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap00Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap04Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap06Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap12Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CmapTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage01Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage02Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CoverageTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CvtTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/DeviceTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureListTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureVariationsTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FpgmTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GaspTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GdefTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GlyfTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GposTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup01x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup01x02.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup02x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup03x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup04x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup05x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup05x02.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup05x03.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup06x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup06x02.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup06x03.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup07x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup08x01.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/HeadTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/HheaTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/HmtxTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/JstfTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Kern00Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Kern02Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/KernTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/LangSysTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/LocaTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/LookupListTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/LookupTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/MathTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/MaxpTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/NameTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Os2Table.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/PcltTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/PostTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/PrepTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/ScriptListTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/ScriptTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/VariationIndexTable.java
trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/VorgTable.java
trunk/foray/foray-font/src/test/java/org/foray/font/ttf/TrueTypeCollectionParserTests.java
trunk/foray/foray-font/src/test/java/org/foray/font/ttf/TrueTypeFontParserTests.java
trunk/foray/foray-font/src/test/java/org/foray/font/ttf/table/OtfLookupGsubTests.java
trunk/foray/foray-font/src/test/java/org/foray/font/type1/Type1FontParserPfaTests.java
trunk/foray/foray-font/src/test/java/org/foray/font/type1/Type1FontParserPfbTests.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cff2TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/CffTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/CoverageTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/CvtTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/DeviceTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/FeatureVariationsTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/FpgmTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GaspTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GdefTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GlyfTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GposTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup01x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup01x02Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup02x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup03x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup05x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup05x02Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup05x03Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup06x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup06x02Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup06x03Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup07x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup08x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/JstfTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/LocaTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MathTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/PrepTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/TableDirectoryHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/TrueTypeFontHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/TtcHeaderHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/VariationIndexTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/VorgTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/package-info.java
Added Paths:
-----------
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseAxisTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseCoordTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseMinMaxTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseScriptTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseValuesTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap00TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap04TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap06TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap12TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/CmapTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Coverage01TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Coverage02TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/FeatureListTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/FeatureTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup04x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/HeadTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/HheaTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/HmtxTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Kern00TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Kern02TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/KernTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/LangSysTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/LookupListTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/LookupTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MaxpTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/NameTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Os2TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/PcltTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/PostTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/ScriptListTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/ScriptTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/BaseAxisTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/BaseCoordTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/BaseMinMaxTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/BaseScriptTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/BaseTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/BaseValuesTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Cff2TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/CffTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Cmap00TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Cmap04TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Cmap06TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Cmap12TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/CmapTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Coverage01TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Coverage02TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/CoverageTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/CvtTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/DeviceTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/FeatureListTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/FeatureTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/FeatureVariationsTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/FpgmTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GaspTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GdefTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GlyfTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GposTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup01x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup01x02Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup02x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup03x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup04x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup05x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup05x02Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup05x03Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup06x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup06x02Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup06x03Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup07x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubLookup08x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/GsubTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/HeadTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/HheaTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/HmtxTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/JstfTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Kern00TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Kern02TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/KernTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/LangSysTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/LocaTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/LookupListTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/LookupTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/MathTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/MaxpTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/NameTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/Os2TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/PcltTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/PostTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/PrepTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/ScriptListTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/ScriptTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TableDirectoryParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TrueTypeFontParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TtcHeaderParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TtfRandomAccessInput.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/TtfType.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/VariationIndexTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/VorgTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/parser/package-info.java
Removed Paths:
-------------
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/BaseAxisTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/BaseCoordTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/BaseMinMaxTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/BaseScriptTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/BaseTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/BaseValuesTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Cff2TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/CffTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Cmap00TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Cmap04TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Cmap06TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Cmap12TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/CmapTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Coverage01TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Coverage02TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/CoverageTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/CvtTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/DeviceTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/FeatureListTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/FeatureTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/FeatureVariationsTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/FpgmTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GaspTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GdefTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GlyfTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GposTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup01x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup01x02Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup02x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup03x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup04x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup05x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup05x02Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup05x03Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup06x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup06x02Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup06x03Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup07x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubLookup08x01Parser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/GsubTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/HeadTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/HheaTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/HmtxTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/JstfTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Kern00TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Kern02TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/KernTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/LangSysTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/LocaTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/LookupListTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/LookupTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/MathTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/MaxpTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/NameTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/Os2TableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/PcltTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/PostTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/PrepTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/ScriptListTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/ScriptTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/TableDirectoryParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/TrueTypeFontParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/TtcHeaderParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/TtfRandomAccessInput.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/TtfType.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/VariationIndexTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/VorgTableParser.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseAxisTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseCoordTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseMinMaxTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseScriptTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/BaseValuesTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap00TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap04TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap06TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Cmap12TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/CmapTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Coverage01TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Coverage02TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/FeatureListTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/FeatureTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubLookup04x01Handler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/GsubTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/HeadTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/HheaTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/HmtxTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Kern00TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Kern02TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/KernTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/LangSysTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/LookupListTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/LookupTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/MaxpTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/NameTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/Os2TableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/PcltTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/PostTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/ScriptListTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/handler/ScriptTableHandler.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttf/package-info.java
trunk/foray/foray-font-parse/src/main/java/org/foray/fontParse/ttfHandler/
Modified: trunk/foray/foray-00-dev/config/checkstyle/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/foray-00-dev/config/checkstyle/checkstyle-suppressions.xml 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-00-dev/config/checkstyle/checkstyle-suppressions.xml 2025-05-10 22:51:20 UTC (rev 13650)
@@ -40,6 +40,6 @@
<suppress checks=".*" files="src.main.archive.*"/>
<!-- Permanently suppress some checks in data transfer interfaces. -->
- <suppress checks="LeftCurly" files="src.main.java.org.foray.fontParse.ttfHandler.*"/>
+ <suppress checks="LeftCurly" files="src.main.java.org.foray.fontParse.ttf.handler.*"/>
</suppressions>
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontContent.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontContent.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontContent.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -39,7 +39,7 @@
import org.foray.font.format.FontParserClient;
import org.foray.font.format.Panose4a;
import org.foray.font.type1.Type1MetricsParser;
-import org.foray.fontParse.ttf.TtfRandomAccessInput;
+import org.foray.fontParse.ttf.parser.TtfRandomAccessInput;
import org.foray.primitive.sequence.ByteArray;
import org.axsl.font.Font;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -34,7 +34,7 @@
import org.foray.font.type1.Type1FontParser;
import org.foray.font.type1.Type1FontParserPfa;
import org.foray.font.type1.Type1FontParserPfb;
-import org.foray.fontParse.ttf.TtfRandomAccessInput;
+import org.foray.fontParse.ttf.parser.TtfRandomAccessInput;
import org.axsl.font.Font;
import org.axsl.font.FontException;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TableDirectory.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TableDirectory.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TableDirectory.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -28,7 +28,7 @@
package org.foray.font.ttf;
-import org.foray.fontParse.ttfHandler.TableDirectoryHandler;
+import org.foray.fontParse.ttf.handler.TableDirectoryHandler;
import org.checkerframework.checker.signedness.qual.Unsigned;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeCollection.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeCollection.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeCollection.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -31,13 +31,13 @@
import org.foray.font.format.FontParser;
import org.foray.font.ttf.table.NameTable;
-import org.foray.fontParse.ttf.NameTableParser;
-import org.foray.fontParse.ttf.TrueTypeFontParser;
-import org.foray.fontParse.ttf.TtcHeaderParser;
-import org.foray.fontParse.ttf.TtfRandomAccessInput;
-import org.foray.fontParse.ttfHandler.NameTableHandler;
-import org.foray.fontParse.ttfHandler.TrueTypeFontHandler;
-import org.foray.fontParse.ttfHandler.TtcHeaderHandler;
+import org.foray.fontParse.ttf.handler.NameTableHandler;
+import org.foray.fontParse.ttf.handler.TrueTypeFontHandler;
+import org.foray.fontParse.ttf.handler.TtcHeaderHandler;
+import org.foray.fontParse.ttf.parser.NameTableParser;
+import org.foray.fontParse.ttf.parser.TrueTypeFontParser;
+import org.foray.fontParse.ttf.parser.TtcHeaderParser;
+import org.foray.fontParse.ttf.parser.TtfRandomAccessInput;
import org.axsl.font.FontException;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeFont.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -57,32 +57,32 @@
import org.foray.font.ttf.table.PrepTable;
import org.foray.font.ttf.table.VorgTable;
import org.foray.fontParse.FontFormat;
-import org.foray.fontParse.ttfHandler.BaseTableHandler;
-import org.foray.fontParse.ttfHandler.Cff2TableHandler;
-import org.foray.fontParse.ttfHandler.CffTableHandler;
-import org.foray.fontParse.ttfHandler.CmapTableHandler;
-import org.foray.fontParse.ttfHandler.CvtTableHandler;
-import org.foray.fontParse.ttfHandler.FpgmTableHandler;
-import org.foray.fontParse.ttfHandler.GaspTableHandler;
-import org.foray.fontParse.ttfHandler.GdefTableHandler;
-import org.foray.fontParse.ttfHandler.GlyfTableHandler;
-import org.foray.fontParse.ttfHandler.GposTableHandler;
-import org.foray.fontParse.ttfHandler.GsubTableHandler;
-import org.foray.fontParse.ttfHandler.HeadTableHandler;
-import org.foray.fontParse.ttfHandler.HheaTableHandler;
-import org.foray.fontParse.ttfHandler.HmtxTableHandler;
-import org.foray.fontParse.ttfHandler.JstfTableHandler;
-import org.foray.fontParse.ttfHandler.KernTableHandler;
-import org.foray.fontParse.ttfHandler.LocaTableHandler;
-import org.foray.fontParse.ttfHandler.MathTableHandler;
-import org.foray.fontParse.ttfHandler.MaxpTableHandler;
-import org.foray.fontParse.ttfHandler.NameTableHandler;
-import org.foray.fontParse.ttfHandler.Os2TableHandler;
-import org.foray.fontParse.ttfHandler.PcltTableHandler;
-import org.foray.fontParse.ttfHandler.PostTableHandler;
-import org.foray.fontParse.ttfHandler.PrepTableHandler;
-import org.foray.fontParse.ttfHandler.TrueTypeFontHandler;
-import org.foray.fontParse.ttfHandler.VorgTableHandler;
+import org.foray.fontParse.ttf.handler.BaseTableHandler;
+import org.foray.fontParse.ttf.handler.Cff2TableHandler;
+import org.foray.fontParse.ttf.handler.CffTableHandler;
+import org.foray.fontParse.ttf.handler.CmapTableHandler;
+import org.foray.fontParse.ttf.handler.CvtTableHandler;
+import org.foray.fontParse.ttf.handler.FpgmTableHandler;
+import org.foray.fontParse.ttf.handler.GaspTableHandler;
+import org.foray.fontParse.ttf.handler.GdefTableHandler;
+import org.foray.fontParse.ttf.handler.GlyfTableHandler;
+import org.foray.fontParse.ttf.handler.GposTableHandler;
+import org.foray.fontParse.ttf.handler.GsubTableHandler;
+import org.foray.fontParse.ttf.handler.HeadTableHandler;
+import org.foray.fontParse.ttf.handler.HheaTableHandler;
+import org.foray.fontParse.ttf.handler.HmtxTableHandler;
+import org.foray.fontParse.ttf.handler.JstfTableHandler;
+import org.foray.fontParse.ttf.handler.KernTableHandler;
+import org.foray.fontParse.ttf.handler.LocaTableHandler;
+import org.foray.fontParse.ttf.handler.MathTableHandler;
+import org.foray.fontParse.ttf.handler.MaxpTableHandler;
+import org.foray.fontParse.ttf.handler.NameTableHandler;
+import org.foray.fontParse.ttf.handler.Os2TableHandler;
+import org.foray.fontParse.ttf.handler.PcltTableHandler;
+import org.foray.fontParse.ttf.handler.PostTableHandler;
+import org.foray.fontParse.ttf.handler.PrepTableHandler;
+import org.foray.fontParse.ttf.handler.TrueTypeFontHandler;
+import org.foray.fontParse.ttf.handler.VorgTableHandler;
import org.foray.primitive.BitUtils;
import org.foray.primitive.sequence.ShortArrayBuilder;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeSingle.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeSingle.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TrueTypeSingle.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -29,10 +29,10 @@
package org.foray.font.ttf;
import org.foray.font.format.FontParser;
-import org.foray.fontParse.ttf.TableDirectoryParser;
-import org.foray.fontParse.ttf.TrueTypeFontParser;
-import org.foray.fontParse.ttfHandler.TableDirectoryHandler;
-import org.foray.fontParse.ttfHandler.TrueTypeFontHandler;
+import org.foray.fontParse.ttf.handler.TableDirectoryHandler;
+import org.foray.fontParse.ttf.handler.TrueTypeFontHandler;
+import org.foray.fontParse.ttf.parser.TableDirectoryParser;
+import org.foray.fontParse.ttf.parser.TrueTypeFontParser;
import org.axsl.font.FontException;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtcHeader.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtcHeader.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtcHeader.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -28,8 +28,8 @@
package org.foray.font.ttf;
-import org.foray.fontParse.ttfHandler.TableDirectoryHandler;
-import org.foray.fontParse.ttfHandler.TtcHeaderHandler;
+import org.foray.fontParse.ttf.handler.TableDirectoryHandler;
+import org.foray.fontParse.ttf.handler.TtcHeaderHandler;
import org.checkerframework.checker.signedness.qual.Unsigned;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtfSubSetFile.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtfSubSetFile.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/TtfSubSetFile.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -34,7 +34,7 @@
import org.foray.font.ttf.table.HeadTable;
import org.foray.font.ttf.table.HmtxTable;
import org.foray.font.ttf.table.LocaTable;
-import org.foray.fontParse.ttf.TtfRandomAccessInput;
+import org.foray.fontParse.ttf.parser.TtfRandomAccessInput;
import org.axsl.constants.PrimitiveConstants;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseAxisTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,8 +30,8 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.BaseAxisTableHandler;
-import org.foray.fontParse.ttfHandler.BaseScriptTableHandler;
+import org.foray.fontParse.ttf.handler.BaseAxisTableHandler;
+import org.foray.fontParse.ttf.handler.BaseScriptTableHandler;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseCoordTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseCoordTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseCoordTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.BaseCoordTableHandler;
+import org.foray.fontParse.ttf.handler.BaseCoordTableHandler;
/**
* A BASE table, BaseCoord subtable.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseMinMaxTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseMinMaxTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseMinMaxTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.BaseMinMaxTableHandler;
+import org.foray.fontParse.ttf.handler.BaseMinMaxTableHandler;
/**
* A BASE table, MinMax subtable.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseScriptTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseScriptTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseScriptTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,9 +30,9 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.BaseMinMaxTableHandler;
-import org.foray.fontParse.ttfHandler.BaseScriptTableHandler;
-import org.foray.fontParse.ttfHandler.BaseValuesTableHandler;
+import org.foray.fontParse.ttf.handler.BaseMinMaxTableHandler;
+import org.foray.fontParse.ttf.handler.BaseScriptTableHandler;
+import org.foray.fontParse.ttf.handler.BaseValuesTableHandler;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,8 +30,8 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.BaseAxisTableHandler;
-import org.foray.fontParse.ttfHandler.BaseTableHandler;
+import org.foray.fontParse.ttf.handler.BaseAxisTableHandler;
+import org.foray.fontParse.ttf.handler.BaseTableHandler;
/**
* An OpenType "BASE" (Baseline Data) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseValuesTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseValuesTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/BaseValuesTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,8 +30,8 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.BaseCoordTableHandler;
-import org.foray.fontParse.ttfHandler.BaseValuesTableHandler;
+import org.foray.fontParse.ttf.handler.BaseCoordTableHandler;
+import org.foray.fontParse.ttf.handler.BaseValuesTableHandler;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cff2Table.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cff2Table.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cff2Table.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.Cff2TableHandler;
+import org.foray.fontParse.ttf.handler.Cff2TableHandler;
/**
* An OpenType "CFF2" (Compact File Format 2.0 PostScript Outlines) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CffTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CffTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CffTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.CffTableHandler;
+import org.foray.fontParse.ttf.handler.CffTableHandler;
/**
* An OpenType "CFF" (Compact File Format 1.0 PostScript Outlines) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap00Table.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap00Table.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap00Table.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.Cmap00TableHandler;
+import org.foray.fontParse.ttf.handler.Cmap00TableHandler;
import org.axsl.ps.Encoding;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap04Table.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap04Table.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap04Table.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.Cmap04TableHandler;
+import org.foray.fontParse.ttf.handler.Cmap04TableHandler;
import org.axsl.ps.Encoding;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap06Table.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap06Table.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap06Table.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.Cmap06TableHandler;
+import org.foray.fontParse.ttf.handler.Cmap06TableHandler;
import org.axsl.ps.Encoding;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap12Table.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap12Table.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Cmap12Table.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.Cmap12TableHandler;
+import org.foray.fontParse.ttf.handler.Cmap12TableHandler;
import org.axsl.ps.Encoding;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CmapTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CmapTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CmapTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,11 +30,11 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.Cmap00TableHandler;
-import org.foray.fontParse.ttfHandler.Cmap04TableHandler;
-import org.foray.fontParse.ttfHandler.Cmap06TableHandler;
-import org.foray.fontParse.ttfHandler.Cmap12TableHandler;
-import org.foray.fontParse.ttfHandler.CmapTableHandler;
+import org.foray.fontParse.ttf.handler.Cmap00TableHandler;
+import org.foray.fontParse.ttf.handler.Cmap04TableHandler;
+import org.foray.fontParse.ttf.handler.Cmap06TableHandler;
+import org.foray.fontParse.ttf.handler.Cmap12TableHandler;
+import org.foray.fontParse.ttf.handler.CmapTableHandler;
import org.axsl.ps.Encoding;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage01Table.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage01Table.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage01Table.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -29,7 +29,7 @@
package org.foray.font.ttf.table;
import org.foray.font.ttf.ParserKit;
-import org.foray.fontParse.ttfHandler.Coverage01TableHandler;
+import org.foray.fontParse.ttf.handler.Coverage01TableHandler;
import org.checkerframework.checker.signedness.qual.Unsigned;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage02Table.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage02Table.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/Coverage02Table.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -29,7 +29,7 @@
package org.foray.font.ttf.table;
import org.foray.font.ttf.ParserKit;
-import org.foray.fontParse.ttfHandler.Coverage02TableHandler;
+import org.foray.fontParse.ttf.handler.Coverage02TableHandler;
import org.checkerframework.checker.signedness.qual.Unsigned;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CoverageTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CoverageTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CoverageTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,11 +30,11 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttf.Coverage01TableParser;
-import org.foray.fontParse.ttf.Coverage02TableParser;
-import org.foray.fontParse.ttf.TtfRandomAccessInput;
-import org.foray.fontParse.ttfHandler.Coverage01TableHandler;
-import org.foray.fontParse.ttfHandler.Coverage02TableHandler;
+import org.foray.fontParse.ttf.handler.Coverage01TableHandler;
+import org.foray.fontParse.ttf.handler.Coverage02TableHandler;
+import org.foray.fontParse.ttf.parser.Coverage01TableParser;
+import org.foray.fontParse.ttf.parser.Coverage02TableParser;
+import org.foray.fontParse.ttf.parser.TtfRandomAccessInput;
import java.io.IOException;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CvtTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CvtTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/CvtTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.CvtTableHandler;
+import org.foray.fontParse.ttf.handler.CvtTableHandler;
/**
* A TrueType/OpenType "cvt" (Control Value Table) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/DeviceTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/DeviceTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/DeviceTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.DeviceTableHandler;
+import org.foray.fontParse.ttf.handler.DeviceTableHandler;
/**
* An OpenType Device table, listed as an "OpenType(tm) Layout Common Table Format".
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureListTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureListTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureListTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,8 +30,8 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.FeatureListTableHandler;
-import org.foray.fontParse.ttfHandler.FeatureTableHandler;
+import org.foray.fontParse.ttf.handler.FeatureListTableHandler;
+import org.foray.fontParse.ttf.handler.FeatureTableHandler;
import org.checkerframework.checker.signedness.qual.Unsigned;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.FeatureTableHandler;
+import org.foray.fontParse.ttf.handler.FeatureTableHandler;
/**
* An OpenType layout table feature.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureVariationsTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureVariationsTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FeatureVariationsTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.FeatureVariationsTableHandler;
+import org.foray.fontParse.ttf.handler.FeatureVariationsTableHandler;
/**
* An OpenType "FeatureVariations".
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FpgmTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FpgmTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/FpgmTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.FpgmTableHandler;
+import org.foray.fontParse.ttf.handler.FpgmTableHandler;
/**
* A TrueType/OpenType "fpgm" (Font Program) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GaspTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GaspTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GaspTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.GaspTableHandler;
+import org.foray.fontParse.ttf.handler.GaspTableHandler;
/**
* A TrueType/OpenType "gasp" (Grid-fitting/Scan-conversion) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GdefTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GdefTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GdefTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.GdefTableHandler;
+import org.foray.fontParse.ttf.handler.GdefTableHandler;
/**
* An OpenType "GDEF" (Glyph Definition Data) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GlyfTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GlyfTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GlyfTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -31,7 +31,7 @@
import org.foray.common.data.BoundingBoxShort;
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.GlyfTableHandler;
+import org.foray.fontParse.ttf.handler.GlyfTableHandler;
import org.foray.primitive.BitUtils;
import org.axsl.ps.BoundingBox;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GposTable.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GposTable.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GposTable.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -30,7 +30,7 @@
import org.foray.font.ttf.ParserKit;
import org.foray.font.ttf.RoTable;
-import org.foray.fontParse.ttfHandler.GposTableHandler;
+import org.foray.fontParse.ttf.handler.GposTableHandler;
/**
* An OpenType "GPOS" (Glyph Positioning Data) table.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup01x01.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup01x01.java 2025-05-10 14:03:21 UTC (rev 13649)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/ttf/table/GsubLookup01x01.java 2025-05-10 22:51:20 UTC (rev 13650)
@@ -29,7 +29,7 @@
package org.foray.font.ttf.table;
import org.foray.font.ttf.ParserKit;
-import org.foray.fontParse.ttfHandler.GsubLookup01x01Handler;
+import org.foray.fontParse.ttf.handler.GsubLookup01x01Handler;
import org.foray.primitive.sequence.IntArrayBuilder;
import org.axsl.font.FontC...
[truncated message content] |
|
From: <vic...@us...> - 2025-05-10 14:03:29
|
Revision: 13649
http://sourceforge.net/p/foray/code/13649
Author: victormote
Date: 2025-05-10 14:03:21 +0000 (Sat, 10 May 2025)
Log Message:
-----------
Add methods and tests to obtain a Script4a instance from a text sample.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2025-05-10 12:03:34 UTC (rev 13648)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2025-05-10 14:03:21 UTC (rev 13649)
@@ -38,6 +38,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.PrimitiveIterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -614,11 +615,12 @@
* @return The instance matching {@code unicodeScript}, or null if the code is not registered.
*/
public static Script4a findFromUnicodeScript(final UnicodeScript unicodeScript) {
- /* If needed, we can do better on performance here at the expense of memory. */
- final Iterator<Map.Entry<Short, Script4a>> iterator = Script4a.mapNumeric.entrySet().iterator();
if (unicodeScript == null) {
return null;
}
+
+ /* If needed, we can do better on performance here at the expense of memory. */
+ final Iterator<Map.Entry<Short, Script4a>> iterator = Script4a.mapNumeric.entrySet().iterator();
while (iterator.hasNext()) {
final Map.Entry<Short, Script4a> entry = iterator.next();
final Script4a script = entry.getValue();
@@ -629,6 +631,40 @@
return null;
}
+ /**
+ * Returns the {@link UnicodeScript} for a sequence of characters.
+ * @param text The text to be tested.
+ * @return The {@link UnicodeScript} of the first codePoint in {@code text} that has a specific script (i.e. not
+ * common, unknown, or inherited). If none are found, returns null.
+ */
+ public static UnicodeScript findUnicodeScriptFromText(final CharSequence text) {
+ if (text == null) {
+ return null;
+ }
+ final PrimitiveIterator.OfInt iterator = text.codePoints().iterator();
+ while (iterator.hasNext()) {
+ final int codePoint = iterator.next();
+ final UnicodeScript unicodeScript = Character.UnicodeScript.of(codePoint);
+ switch (unicodeScript) {
+ case COMMON:
+ case UNKNOWN:
+ case INHERITED: break;
+ default: return unicodeScript;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds the script for some text.
+ * @param text The text to be tested.
+ * @return The
+ */
+ public static Script4a findFromText(final CharSequence text) {
+ final UnicodeScript unicodeScript = findUnicodeScriptFromText(text);
+ return findFromUnicodeScript(unicodeScript);
+ }
+
@Override
public String toString() {
return this.alphaCode;
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java 2025-05-10 12:03:34 UTC (rev 13648)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java 2025-05-10 14:03:21 UTC (rev 13649)
@@ -32,15 +32,27 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.Test;
+import java.lang.Character.UnicodeScript;
+
/**
* Tests of {@link Script4a}.
*/
public class Script4aTests {
+ /** Sample text to test the Latin script. */
+ private static final char LATIN_TEXT = 'm';
+
+ /** Sample text to test the Greek script. */
+ private static final char GREEK_TEXT = 'μ';
+
+ /** Sample text that is not part of a specific script. */
+ private static final char COMMON_TEXT = ' ';
+
/**
* Basic test to make sure the class loads properly and returns some basic information.
*/
@@ -78,4 +90,25 @@
assertFalse(Script4a.matchesPattern("Aaa"));
}
+ /**
+ * Tests of {@link Script4a#matchesPattern(CharSequence)}.
+ */
+ @Test
+ public void testFromTextMethods() {
+ final char[] chars1 = {COMMON_TEXT, COMMON_TEXT, LATIN_TEXT, GREEK_TEXT, COMMON_TEXT};
+ final String sample1 = new String(chars1);
+ assertEquals(UnicodeScript.LATIN, Script4a.findUnicodeScriptFromText(sample1));
+ assertEquals(Script4a.LATIN, Script4a.findFromText(sample1));
+
+ final char[] chars2 = {COMMON_TEXT, COMMON_TEXT, COMMON_TEXT};
+ final String sample2 = new String(chars2);
+ assertNull(Script4a.findUnicodeScriptFromText(sample2));
+ assertNull(Script4a.findFromText(sample2));
+
+ final char[] chars3 = {GREEK_TEXT, LATIN_TEXT, COMMON_TEXT};
+ final String sample3 = new String(chars3);
+ assertEquals(UnicodeScript.GREEK, Script4a.findUnicodeScriptFromText(sample3));
+ assertEquals(Script4a.GREEK, Script4a.findFromText(sample3));
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-10 12:03:36
|
Revision: 13648
http://sourceforge.net/p/foray/code/13648
Author: victormote
Date: 2025-05-10 12:03:34 +0000 (Sat, 10 May 2025)
Log Message:
-----------
Conform to aXSL change: Remove duplicate CSS method, replacing it with use of font-selection-strategy that matches that behavior.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2025-05-10 11:30:56 UTC (rev 13647)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2025-05-10 12:03:34 UTC (rev 13648)
@@ -1249,7 +1249,7 @@
final FontStretch fontStretch = foNeedingFont.traitFontStretch(this);
final FontConsumer fontConsumer = getAreaTree().getFontConsumer();
- final FontUse resolvedFont = fontConsumer.selectFontXsl(fontSelectionStrategy, foFontFamily, fontStyle,
+ final FontUse resolvedFont = fontConsumer.selectFont(fontSelectionStrategy, foFontFamily, fontStyle,
fontWeight, fontVariant, fontStretch, firstChar);
if (resolvedFont == null) {
getAreaTree().logError("Error creating Font.\n" + ((Fo) foNeedingFont).getContextMessage());
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-10 11:30:56 UTC (rev 13647)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-10 12:03:34 UTC (rev 13648)
@@ -227,7 +227,7 @@
}
@Override
- public org.axsl.font.FontUse selectFontXsl(
+ public org.axsl.font.FontUse selectFont(
final FontSelectionStrategy selectionStrategy,
final List<String> familyList, final FontStyle style,
final FontWeight weight, final FontVariant variant,
@@ -427,13 +427,6 @@
}
@Override
- public org.axsl.font.FontUse selectFontCss(final List<String> familyList, final FontStyle style,
- final FontWeight weight, final FontVariant variant, final FontStretch stretch, final int codePoint) {
- return selectFontXsl(FontSelectionStrategy.CHARACTER_BY_CHARACTER, familyList, style, weight, variant, stretch,
- codePoint);
- }
-
- @Override
public List<Font4a> getUsedFonts() {
if (this.usedFonts.size() < 1) {
return Collections.emptyList();
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java 2025-05-10 11:30:56 UTC (rev 13647)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java 2025-05-10 12:03:34 UTC (rev 13648)
@@ -330,7 +330,8 @@
for (final Iterator<?> i = gvtFonts.iterator(); i.hasNext(); ) {
final GVTFontFamily fam = (GVTFontFamily) i.next();
this.fontFamily = fam.getFamilyName();
- final org.axsl.font.FontUse font = this.fontConsumer.selectFontCss(
+ final org.axsl.font.FontUse font = this.fontConsumer.selectFont(
+ FontSelectionStrategy.CHARACTER_BY_CHARACTER,
FontUtility.foFontFamily(this.fontFamily),
style, weight, FontVariant.NORMAL,
FontStretch.NORMAL,
@@ -347,7 +348,7 @@
}
}
this.fontFamily = "any";
- return this.fontConsumer.selectFontXsl(
+ return this.fontConsumer.selectFont(
FontSelectionStrategy.AUTO,
Arrays.asList(new String[] {"any"}),
style,
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java 2025-05-10 11:30:56 UTC (rev 13647)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java 2025-05-10 12:03:34 UTC (rev 13648)
@@ -713,7 +713,7 @@
if (gFont.isBold()) {
fontWeight = FontWeight.BOLD;
}
- FontUse fontUse = this.fontConsumer.selectFontXsl(
+ FontUse fontUse = this.fontConsumer.selectFont(
FontSelectionStrategy.AUTO,
FontUtility.foFontFamily(fontFamily),
fontStyle, fontWeight,
@@ -753,7 +753,9 @@
fontFamily.add((String) iterator.getAttribute(TextAttribute.FAMILY));
final Float fontSize = (Float) iterator.getAttribute(
TextAttribute.FAMILY);
- FontUse font = this.fontConsumer.selectFontCss(fontFamily,
+ FontUse font = this.fontConsumer.selectFont(
+ FontSelectionStrategy.CHARACTER_BY_CHARACTER,
+ fontFamily,
FontStyle.NORMAL,
FontWeight.NORMAL,
FontVariant.NORMAL,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-10 11:30:59
|
Revision: 13647
http://sourceforge.net/p/foray/code/13647
Author: victormote
Date: 2025-05-10 11:30:56 +0000 (Sat, 10 May 2025)
Log Message:
-----------
Conform to aXSL change: Use Script instead of char for selection of font fallback.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-10 09:55:28 UTC (rev 13646)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-10 11:30:56 UTC (rev 13647)
@@ -39,6 +39,7 @@
import org.axsl.font.FontSelectionConstraints;
import org.axsl.font.FontUse;
import org.axsl.font.zzz.FontSelectionConstraintsMdo;
+import org.axsl.i18n.Script;
import org.axsl.ps.Encoding;
import org.axsl.value.FontSelectionStrategy;
import org.axsl.value.FontStretch;
@@ -285,7 +286,7 @@
}
@Override
- public FontUse selectFontFallback(final int codePoint) {
+ public FontUse selectFontFallback(final Script codePoint) {
/* TODO: Implement this. */
return null;
}
@@ -298,15 +299,12 @@
}
Font4a fontSelected = null;
if (this.selectionConstraints.canSelectFreeStandingFonts()) {
- fontSelected = fontDescSelected.getRegisteredFont()
- .getFreeStandingFont();
+ fontSelected = fontDescSelected.getRegisteredFont().getFreeStandingFont();
} else {
- fontSelected = fontDescSelected.getRegisteredFont()
- .getSystemFont();
+ fontSelected = fontDescSelected.getRegisteredFont().getSystemFont();
}
final ConsumerFont4a consumerFont = registerFontUse(fontSelected);
- return consumerFont.getFontUse(fontDescSelected,
- fontSelected.getInternalEncoding());
+ return consumerFont.getFontUse(fontDescSelected, fontSelected.getInternalEncoding());
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-10 09:55:30
|
Revision: 13646
http://sourceforge.net/p/foray/code/13646
Author: victormote
Date: 2025-05-10 09:55:28 +0000 (Sat, 10 May 2025)
Log Message:
-----------
Minor cleanup of variable names and doc.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-10 00:10:08 UTC (rev 13645)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-10 09:55:28 UTC (rev 13646)
@@ -577,8 +577,8 @@
RegisteredFont bestFit = null;
long bestDifference = Long.MAX_VALUE;
for (RegisteredFontFamily rff : this.server.registeredFontFamilies()) {
- for (int i = 0; i < rff.getFontDescriptions().size(); i++) {
- final RegisteredFont rfd = rff.getFontDescriptions().get(i);
+ for (int i = 0; i < rff.getRegisteredFonts().size(); i++) {
+ final RegisteredFont rfd = rff.getRegisteredFonts().get(i);
final Panose4a panoseInstance = rfd.getRegisteredFont()
.getPanose();
final long difference = panoseInstance.difference(desiredPanose, null);
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java 2025-05-10 00:10:08 UTC (rev 13645)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java 2025-05-10 09:55:28 UTC (rev 13646)
@@ -108,7 +108,7 @@
return null;
}
final FontSelectionConstraints constraints = this.getConsumer().getSelectionConstraints();
- return rff.findRegisteredFontDesc(style, weight, variant, stretch,
+ return rff.findBestMatch(style, weight, variant, stretch,
constraints.canSelectFreeStandingFonts(),
constraints.canSelectSystemFonts());
}
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-10 00:10:08 UTC (rev 13645)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-10 09:55:28 UTC (rev 13646)
@@ -265,7 +265,7 @@
final RegisteredFontFamily rff = getRegisteredFontFamily("any");
if (rff != null) {
/* Try to find one with normal characteristics. */
- defaultFont = rff.findRegisteredFontDesc(
+ defaultFont = rff.findBestMatch(
FontStyle.NORMAL,
FontWeight.NORMAL,
FontVariant.NORMAL,
@@ -276,7 +276,7 @@
return defaultFont;
}
/* Try to find one with regardless of characteristics. */
- defaultFont = rff.findRegisteredFontDesc(
+ defaultFont = rff.findBestMatch(
FontStyle.NORMAL,
FontWeight.NORMAL,
FontVariant.NORMAL,
@@ -288,7 +288,7 @@
return defaultFont;
}
for (RegisteredFontFamily currentRff : this.fontFamilies.values()) {
- defaultFont = currentRff.findRegisteredFontDesc(
+ defaultFont = currentRff.findBestMatch(
FontStyle.NORMAL,
FontWeight.NORMAL,
FontVariant.NORMAL,
@@ -469,7 +469,7 @@
private void registerBase14CourierFamily() throws FontException {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(
"Base14-Courier");
- if (rff.getFontDescriptions().size() > 0) {
+ if (rff.getRegisteredFonts().size() > 0) {
return;
}
registerBase14Description("Base14-Courier", "Base14-Courier", FontStyle.NORMAL, FontWeight.NORMAL);
@@ -485,7 +485,7 @@
private void registerBase14HelveticaFamily() throws FontException {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(
"Base14-Helvetica");
- if (rff.getFontDescriptions().size() > 0) {
+ if (rff.getRegisteredFonts().size() > 0) {
return;
}
registerBase14Description("Base14-Helvetica", "Base14-Helvetica", FontStyle.NORMAL, FontWeight.NORMAL);
@@ -502,7 +502,7 @@
private void registerBase14TimesFamily() throws FontException {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(
"Base14-Times");
- if (rff.getFontDescriptions().size() > 0) {
+ if (rff.getRegisteredFonts().size() > 0) {
return;
}
registerBase14Description("Base14-Times", "Base14-Times", FontStyle.NORMAL, FontWeight.NORMAL);
@@ -518,7 +518,7 @@
private void registerBase14SymbolFamily() throws FontException {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(
"Base14-Symbol");
- if (rff.getFontDescriptions().size() > 0) {
+ if (rff.getRegisteredFonts().size() > 0) {
return;
}
registerBase14Description("Base14-Symbol", "Base14-Symbol", FontStyle.NORMAL, FontWeight.NORMAL);
@@ -531,7 +531,7 @@
private void registerBase14DingbatsFamily() throws FontException {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(
"Base14-ZapfDingbats");
- if (rff.getFontDescriptions().size() > 0) {
+ if (rff.getRegisteredFonts().size() > 0) {
return;
}
registerBase14Description("Base14-ZapfDingbats", "Base14-ZapfDingbats", FontStyle.NORMAL, FontWeight.NORMAL);
@@ -707,7 +707,7 @@
if (rff != null) {
throw new FontException("font-family already registered: " + name);
}
- rff = new RegisteredFontFamily(this, name);
+ rff = new RegisteredFontFamily(name);
this.fontFamilies.put(name, rff);
return rff;
}
@@ -835,7 +835,7 @@
final List<Font4a> fontList = new ArrayList<Font4a>();
for (RegisteredFontFamily family : this.fontFamilies.values()) {
final List<RegisteredFont> rfdList
- = family.getFontDescriptions();
+ = family.getRegisteredFonts();
if (rfdList != null) {
for (int i = 0; i < rfdList.size(); i++) {
final RegisteredFont rfd = rfdList.get(i);
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java 2025-05-10 00:10:08 UTC (rev 13645)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java 2025-05-10 09:55:28 UTC (rev 13646)
@@ -128,41 +128,6 @@
this.fontFeatureSimulation = simulation == null ? FontFeatureSimulation.DEFAULT : simulation;
}
-// /**
-// * Factory method thatConstructor for unparsed characteristics.
-// * @param fontContent The font content for this font.
-// * @param encoding The encoding for the font description.
-// * @param style The style (normal, italic, etc.).
-// * @param weight The weight (normal, bold, 100, etc.).
-// * @param variant The variant (normal, small-caps).
-// * @param stretch The stretch (normal, condensed, etc.).
-// * @throws FontException For error in registration.
-// */
-// public RegisteredFont make(final RegisteredFontContent fontContent,
-// final Encoding encoding, final String style, final String weight,
-// final String variant, final String stretch)
-// throws FontException {
-// Font.Style fontStyle = Font.Style.parseFo(style, false);
-// if (fontStyle == null) {
-// fontStyle = Font.Style.NORMAL;
-// }
-// Font.Weight fontWeight = Font.Weight.parseFo(weight, false);
-// if (fontWeight == null) {
-// fontWeight = Font.Weight.NORMAL;
-// }
-// Font.Variant fontVariant = Font.Variant.parseFo(variant, false);
-// if (fontVariant == null) {
-// fontVariant = Font.Variant.NORMAL;
-// }
-// Font.Stretch fontStretch = Font.Stretch.parseFo(stretch, false);
-// if (fontStretch == null) {
-// fontStretch = Font.Stretch.NORMAL;
-// }
-// registerFontDesc(registeredFont, encoding, fontStyle, fontWeight,
-// fontVariant, fontStretch, simSmallCaps, simOblique,
-// simBackslant, simStretch);
-// }
-
/**
* Returns the font style.
* @return The font style.
@@ -253,12 +218,10 @@
}
/**
- * Determine whether two RegisteredFontDesc instances have the same set of
- * characteristics (font-weight, font-style, etc).
- * Note that, for purposes of this method, the encoding is not
- * considered to be a characteristic.
- * @param otherDesc A RegisteredFontDesc instance which should be compared
- * to this one.
+ * Determine whether two RegisteredFontDesc instances have the same set of characteristics (font-weight, font-style,
+ * etc).
+ * Note that, for purposes of this method, the encoding is not considered to be a characteristic.
+ * @param otherDesc A RegisteredFontDesc instance which should be compared to this one.
* @return True if and only if otherDesc has the same set of characteristics as this.
*/
public boolean equivalent(final RegisteredFont otherDesc) {
@@ -273,17 +236,14 @@
}
/**
- * Determine whether two RegisteredFontDesc instances have the same set of
- * characteristics (font-family, font-style, etc), but without regard to
+ * Determine whether two RegisteredFontDesc instances have the same set of characteristics (font-family, font-style,
+ * etc), but without regard to font-weight.
+ * Note that, for purposes of this method, the encoding is not considered to be a characteristic.
+ * @param otherDesc A RegisteredFontDesc instance which should be compared to this one.
+ * @return True if and only if otherDesc has the same set of characteristics as this, but without regard to
* font-weight.
- * Note that, for purposes of this method, the encoding is not
- * considered to be a characteristic.
- * @param otherDesc A RegisteredFontDesc instance which should be compared
- * to this one.
- * @return True if and only if otherDesc has the same set of characteristics as this,
- * but without regard to font-weight.
- * In other words, if all other characteristics are equal, true will be
- * returned, regardless of whether font-weight is equal or not.
+ * In other words, if all other characteristics are equal, true will be returned, regardless of whether font-weight
+ * is equal or not.
*/
public boolean equivalentExceptWeight(final RegisteredFont otherDesc) {
return matchIgnoreWeight(otherDesc.getRegisteredFontFamily(),
@@ -298,16 +258,13 @@
/**
* Indicates whether this font description matches a given style.
* @param inputDesiredStyle The style to match.
- * @param considerSimulated Indicates whether simulated features should be
- * considered in the test.
+ * @param considerSimulated Indicates whether simulated features should be considered in the test.
* @return True if and only if the style of this font description matches the criteria.
*/
- public boolean styleMatches(final FontStyle inputDesiredStyle,
- final boolean considerSimulated) {
+ public boolean styleMatches(final FontStyle inputDesiredStyle, final boolean considerSimulated) {
if (considerSimulated) {
if (this.fontFeatureSimulation.getSimulatedOblique() != null) {
- /* If it can simulate oblique, it can be used for either
- * oblique or italic or normal. */
+ /* If it can simulate oblique, it can be used for either oblique or italic or normal. */
switch (inputDesiredStyle) {
case NORMAL:
case ITALIC:
@@ -346,8 +303,7 @@
/**
* Indicates whether this font description matches a given variant.
* @param desiredVariant The variant to match.
- * @param considerSimulated Indicates whether simulated features should be
- * considered in the test.
+ * @param considerSimulated Indicates whether simulated features should be considered in the test.
* @return True if and only if the style of this font description matches the criteria.
*/
public boolean variantMatches(final FontVariant desiredVariant,
@@ -354,8 +310,7 @@
final boolean considerSimulated) {
if (considerSimulated) {
if (this.fontFeatureSimulation.getSimulatedSmallCaps() != null) {
- /* If it can simulate small-caps, it can be used for either
- * small-caps or normal. */
+ /* If it can simulate small-caps, it can be used for either small-caps or normal. */
return true;
}
}
@@ -369,8 +324,7 @@
/**
* Indicates whether this font description matches a given stretch.
* @param desiredStretch The stretch to match.
- * @param considerSimulated Indicates whether simulated features should be
- * considered in the test.
+ * @param considerSimulated Indicates whether simulated features should be considered in the test.
* @return True if and only if the style of this font description matches the criteria.
*/
public boolean stretchMatches(final FontStretch desiredStretch, final boolean considerSimulated) {
@@ -398,32 +352,24 @@
}
/**
- * Indicates whether this font description perfectly matches a given set of
- * criteria.
+ * Indicates whether this font description perfectly matches a given set of criteria.
* @param family The desired font-family.
- * @param considerSimulated Indicates whether simulated features should be
- * considered in this selection.
+ * @param considerSimulated Indicates whether simulated features should be considered in this selection.
* @param style The desired style.
* @param weight The desired weight.
* @param variant The desired variant.
* @param stretch The desired stretch.
- * @param freeStandingFonts Indicates whether free-standing fonts can be
- * considered in this selection.
- * @param systemFonts Indicates whether system fonts can be consdidered in
- * this selection.
- * @return True if and only if this font descriptions perfectly matches all of the
- * selection criteria.
+ * @param freeStandingFonts Indicates whether free-standing fonts can be considered in this selection.
+ * @param systemFonts Indicates whether system fonts can be consdidered in this selection.
+ * @return True if and only if this font descriptions perfectly matches all of the selection criteria.
*/
- public boolean matchPerfect(final RegisteredFontFamily family,
- final boolean considerSimulated, final FontStyle style,
- final FontWeight weight, final FontVariant variant,
- final FontStretch stretch, final boolean freeStandingFonts,
- final boolean systemFonts) {
+ public boolean matchPerfect(final RegisteredFontFamily family, final boolean considerSimulated,
+ final FontStyle style, final FontWeight weight, final FontVariant variant, final FontStretch stretch,
+ final boolean freeStandingFonts, final boolean systemFonts) {
if (! generalTypeMatches(freeStandingFonts, systemFonts)) {
return false;
}
- if (! matchIgnoreWeight(family, considerSimulated, style, variant,
- stretch, freeStandingFonts, systemFonts)) {
+ if (! matchIgnoreWeight(family, considerSimulated, style, variant, stretch, freeStandingFonts, systemFonts)) {
return false;
}
if (! weightMatches(weight)) {
@@ -435,21 +381,16 @@
/**
* Indicates whether this font description matches a given set of criteria, without regard to the font-weight.
* @param family The desired font-family.
- * @param considerSimulated Indicates whether simulated features should be
- * considered in this selection.
+ * @param considerSimulated Indicates whether simulated features should be considered in this selection.
* @param style The desired style.
* @param variant The desired variant.
* @param stretch The desired stretch.
- * @param freeStandingFonts Indicates whether free-standing fonts can be
- * considered in this selection.
- * @param systemFonts Indicates whether system fonts can be consdidered in
- * this selection.
- * @return True if and only if this font descriptions perfectly matches all of the
- * selection criteria.
+ * @param freeStandingFonts Indicates whether free-standing fonts can be considered in this selection.
+ * @param systemFonts Indicates whether system fonts can be consdidered in this selection.
+ * @return True if and only if this font descriptions perfectly matches all of the selection criteria.
*/
- public boolean matchIgnoreWeight(final RegisteredFontFamily family,
- final boolean considerSimulated, final FontStyle style,
- final FontVariant variant, final FontStretch stretch,
+ public boolean matchIgnoreWeight(final RegisteredFontFamily family, final boolean considerSimulated,
+ final FontStyle style, final FontVariant variant, final FontStretch stretch,
final boolean freeStandingFonts, final boolean systemFonts) {
if (! generalTypeMatches(freeStandingFonts, systemFonts)) {
return false;
@@ -471,13 +412,11 @@
}
/**
- * Determines whether this registered font can return a Font instance that
- * matches the general type requested.
- * @param freeStandingFonts True if and only if the returned font can be a
- * FreeStandingFont.
+ * Determines whether this registered font can return a Font instance that matches the general type requested.
+ * @param freeStandingFonts True if and only if the returned font can be a FreeStandingFont.
* @param systemFonts True if and only if the returned font can be a SystemFont.
- * @return True if and only if this registered font is able to return a Font instance
- * that matches the needs described by freeStandingFonts and systemFonts.
+ * @return True if and only if this registered font is able to return a Font instance that matches the needs
+ * described by freeStandingFonts and systemFonts.
*/
public boolean generalTypeMatches(final boolean freeStandingFonts,
final boolean systemFonts) {
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java 2025-05-10 00:10:08 UTC (rev 13645)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java 2025-05-10 09:55:28 UTC (rev 13646)
@@ -28,8 +28,6 @@
package org.foray.font.config;
-import org.foray.font.FontServer4a;
-
import org.axsl.font.FontException;
import org.axsl.value.FontStretch;
import org.axsl.value.FontStyle;
@@ -54,22 +52,17 @@
* items, (0, 1, etc.). */
private static final byte WEIGHT_INDEX_FACTOR = 100;
- /** The parent FOrayFontServer. */
- private FontServer4a fontServer;
-
/** The name of this font family, for example "Courier", as presented in the font configuration. **/
private String name;
/** Collection of {@link RegisteredFont} instances that are associated with this family. */
- private List<RegisteredFont> fontDescriptions = new ArrayList<RegisteredFont>();
+ private List<RegisteredFont> registeredFonts = new ArrayList<RegisteredFont>();
/**
* Constructor.
- * @param fontServer The parent font server.
* @param name The name of this font family (e.g. "Courier").
*/
- public RegisteredFontFamily(final FontServer4a fontServer, final String name) {
- this.fontServer = fontServer;
+ public RegisteredFontFamily(final String name) {
this.name = name;
}
@@ -82,7 +75,7 @@
}
/**
- * Register the description of a font with this family.
+ * Register a {@link RegisteredFont} with this family.
* @param font The font to be registered.
* @throws FontException For a font that is missing required parameters, and for the case of an already registered
* font having the same characteristics.
@@ -106,8 +99,8 @@
}
/* Check for match with fonts already registered. */
- for (int index = 0; index < this.fontDescriptions.size(); index ++) {
- final RegisteredFont existingFont = this.fontDescriptions.get(index);
+ for (int index = 0; index < this.registeredFonts.size(); index ++) {
+ final RegisteredFont existingFont = this.registeredFonts.get(index);
if (existingFont.equivalent(font)) {
final String template = "Equivalent font-description already exists in font-family {}: " +
"font-style {}, font-weight {}";
@@ -117,7 +110,7 @@
}
}
- this.fontDescriptions.add(font);
+ this.registeredFonts.add(font);
}
/**
@@ -131,9 +124,8 @@
* @param systemFonts Indicates whether system fonts can be considered in this selection.
* @return The first matching RegisteredFontDesc found for this font-family, or null if none match.
*/
- public RegisteredFont findRegisteredFontDesc(final FontStyle style,
- final FontWeight weight, final FontVariant variant,
- final FontStretch stretch, final boolean freeStandingFonts,
+ public RegisteredFont findBestMatch(final FontStyle style, final FontWeight weight,
+ final FontVariant variant, final FontStretch stretch, final boolean freeStandingFonts,
final boolean systemFonts) {
/* According to the CSS2 Recommendation, Section 15.5, weight will never cause the failure of a font-family to
* select a font.
@@ -152,8 +144,8 @@
RegisteredFont bestMatch = null;
/* First, look for a perfect match without considering simulated features. */
- for (int i = 0; i < this.fontDescriptions.size(); i++) {
- final RegisteredFont fd = this.fontDescriptions.get(i);
+ for (int i = 0; i < this.registeredFonts.size(); i++) {
+ final RegisteredFont fd = this.registeredFonts.get(i);
if (fd.matchIgnoreWeight(this, false, style, variant, stretch, freeStandingFonts, systemFonts)) {
final int index = this.weightArrayIndex(fd.getFontWeight());
matches[index] = fd;
@@ -165,8 +157,8 @@
}
/* Next, look for a perfect match that does consider the simulated features. */
- for (int i = 0; i < this.fontDescriptions.size(); i++) {
- final RegisteredFont fd = this.fontDescriptions.get(i);
+ for (int i = 0; i < this.registeredFonts.size(); i++) {
+ final RegisteredFont fd = this.registeredFonts.get(i);
if (fd.matchPerfect(this, true, style, weight, variant, stretch, freeStandingFonts, systemFonts)) {
final int index = this.weightArrayIndex(fd.getFontWeight());
matches[index] = fd;
@@ -177,8 +169,7 @@
}
/**
- * Decides which of two {@link RegisteredFont} instances best fills the
- * requested weight value.
+ * Decides which of two {@link RegisteredFont} instances best fills the requested weight value.
* @param matches The candidate font descriptors.
* @param weight The requested weight value.
* @return The descriptor best matching the requested weight.
@@ -216,8 +207,7 @@
return matches[i];
}
}
- throw new IllegalStateException("Unaccounted index (1) in "
- + this.getClass().getName());
+ throw new IllegalStateException("Unaccounted index (1) in " + this.getClass().getName());
} else {
/* Return the next lighter value, if it exists ... */
for (int i = index - 1; i >= 0; i--) {
@@ -231,8 +221,7 @@
return matches[i];
}
}
- throw new IllegalStateException("Unaccounted index (2) in "
- + this.getClass().getName());
+ throw new IllegalStateException("Unaccounted index (2) in " + this.getClass().getName());
}
}
@@ -242,33 +231,20 @@
* @return The 0-based array index, 0 for 100, 1 for 200, etc.
*/
private int weightArrayIndex(final FontWeight weight) {
- /* TODO: Move this ugly little computation to axsl. */
- int index = weight.getNumericWeight()
- / RegisteredFontFamily.WEIGHT_INDEX_FACTOR;
+ int index = weight.getNumericWeight() / RegisteredFontFamily.WEIGHT_INDEX_FACTOR;
index --;
return index;
}
/**
- * Return the related font server.
- * @return The font server.
- */
- public FontServer4a getFontServer() {
- return this.fontServer;
- }
-
- /**
* Returns the next bolder font.
- * @param baseline The baseline font for which a bolder version should be
- * found.
- * @return The next bolder font, or the baseline font if no bolder font
- * exists.
+ * @param baseline The baseline font for which a bolder version should be found.
+ * @return The next bolder font, or the baseline font if no bolder font exists.
*/
- public RegisteredFont nextBolderFont(
- final RegisteredFont baseline) {
+ public RegisteredFont nextBolderFont(final RegisteredFont baseline) {
RegisteredFont best = null;
- for (int i = 0; i < this.fontDescriptions.size(); i++) {
- final RegisteredFont candidate = this.fontDescriptions.get(i);
+ for (int i = 0; i < this.registeredFonts.size(); i++) {
+ final RegisteredFont candidate = this.registeredFonts.get(i);
// Ignore the baseline.
if (candidate == baseline) {
continue;
@@ -298,16 +274,13 @@
/**
* Returns the next lighter font.
- * @param baseline The baseline font for which a lighter version should be
- * found.
- * @return The next lighter font, or the baseline font if no lighter font
- * exists.
+ * @param baseline The baseline font for which a lighter version should be found.
+ * @return The next lighter font, or the baseline font if no lighter font exists.
*/
- public RegisteredFont nextLighterFont(
- final RegisteredFont baseline) {
+ public RegisteredFont nextLighterFont(final RegisteredFont baseline) {
RegisteredFont best = null;
- for (int i = 0; i < this.fontDescriptions.size(); i++) {
- final RegisteredFont candidate = this.fontDescriptions.get(i);
+ for (int i = 0; i < this.registeredFonts.size(); i++) {
+ final RegisteredFont candidate = this.registeredFonts.get(i);
// Ignore the baseline.
if (candidate == baseline) {
continue;
@@ -336,35 +309,11 @@
}
/**
- * Converts a String representing a percentage to its decimal value.
- * @param inputString A String representing a percentage. It must end with
- * the "%" symbol.
- * @param defaultValue The value to be returned if the parse is unsuccessful.
- * @return The converted percentage, or {@code defaultValue} if the input is
- * not valid. An input value of "98%" will return 98.0.
- */
- public static float convertPercent(final String inputString, final float defaultValue) {
- float output = defaultValue;
- if (inputString == null) {
- return output;
- }
- // The percent sign is required
- final int index = inputString.indexOf('%');
- if (index < 0) {
- return output;
- }
- final String input = inputString.substring(0, index);
- output = Float.parseFloat(input);
- return output;
- }
-
- /**
- * Returns the list of {@link RegisteredFont} instances that are
- * associated with this family.
+ * Returns the list of {@link RegisteredFont} instances that are associated with this family.
* @return The font descriptions.
*/
- public List<RegisteredFont> getFontDescriptions() {
- return this.fontDescriptions;
+ public List<RegisteredFont> getRegisteredFonts() {
+ return this.registeredFonts;
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-10 00:10:12
|
Revision: 13645
http://sourceforge.net/p/foray/code/13645
Author: victormote
Date: 2025-05-10 00:10:08 +0000 (Sat, 10 May 2025)
Log Message:
-----------
Conform to aXSL change: Move Panose interface out of aXSL.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/SystemFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose4a.java
trunk/foray/foray-font/src/test/java/org/foray/font/ttf/TrueTypeFontParserTests.java
trunk/foray/foray-font-tf/src/main/java/org/foray/font/fixture/MockFont.java
Added Paths:
-----------
trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2025-05-09 22:58:05 UTC (rev 13644)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -30,6 +30,7 @@
import org.foray.common.FontUtil;
import org.foray.font.config.RegisteredFontContent;
import org.foray.font.format.Kerning;
+import org.foray.font.format.Panose4a;
import org.axsl.font.Font;
import org.axsl.i18n.Script;
@@ -464,4 +465,12 @@
*/
public abstract boolean supportsUnicode();
+ /**
+ * Returns the Panose 1.0 characteristics for this font.
+ * @return The Panose array for this font, or null if the array is not known.
+ * @see "http://www.w3.org/Printing/stevahn.html#references"
+ * @see "https://en.wikipedia.org/wiki/PANOSE"
+ */
+ public abstract Panose4a getPanose();
+
}
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-09 22:58:05 UTC (rev 13644)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -31,6 +31,7 @@
import org.foray.font.config.RegisteredFont;
import org.foray.font.config.RegisteredFontContent;
import org.foray.font.config.RegisteredFontFamily;
+import org.foray.font.format.Panose;
import org.foray.font.format.Panose4a;
import org.axsl.font.FontConsumer;
@@ -37,7 +38,6 @@
import org.axsl.font.FontException;
import org.axsl.font.FontSelectionConstraints;
import org.axsl.font.FontUse;
-import org.axsl.font.Panose;
import org.axsl.font.zzz.FontSelectionConstraintsMdo;
import org.axsl.ps.Encoding;
import org.axsl.value.FontSelectionStrategy;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java 2025-05-09 22:58:05 UTC (rev 13644)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FreeStandingFont.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -564,10 +564,6 @@
return this.panose;
}
- /**
- * {@inheritDoc}
- * @see #getPanoseInstance()
- */
@Override
public Panose4a getPanose() {
return this.panose;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/SystemFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/SystemFont.java 2025-05-09 22:58:05 UTC (rev 13644)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/SystemFont.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -540,7 +540,12 @@
return getEstimatedOverlinePosition(fontSize);
}
- @Override
+ /**
+ * Returns the Panose 1.0 characteristics for this font.
+ * @return The Panose array for this font, or null if the array is not known.
+ * @see "http://www.w3.org/Printing/stevahn.html#references"
+ * @see "https://en.wikipedia.org/wiki/PANOSE"
+ */
public Panose4a getPanose() {
return null;
}
Added: trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose.java (rev 0)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -0,0 +1,111 @@
+/*
+ * Copyright 20254 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.font.format;
+
+/**
+ * <p>PANOSE 1.0 description of a font.</p>
+ *
+ * <p>Note that PANOSE is (or was) a registered trademark of Hewlett-Packard Co.</p>
+ *
+ * @see "http://www.w3.org/Printing/stevahn.html#references"
+ * @see "https://en.wikipedia.org/wiki/PANOSE"
+ */
+public interface Panose {
+
+ /** The quantity of element in a Panose 1.0 array. */
+ byte QTY_PANOSE_ELEMENTS = 10;
+
+ /**
+ * Describes the family kind of the font.
+ * @return The family kind descriptor.
+ */
+ int getFamilyKind();
+
+ /**
+ * Describes the serif style of the font.
+ * @return The serif style descriptor.
+ */
+ int getSerifStyle();
+
+ /**
+ * Describes the weight of the font.
+ * @return The weight descriptor.
+ */
+ int getWeight();
+
+ /**
+ * Describes the proportion of the font.
+ * @return The proportion descriptor.
+ */
+ int getProportion();
+
+ /**
+ * Describes the contract of the font.
+ * @return The contrast descriptor.
+ */
+ int getContrast();
+
+ /**
+ * Describes the stroke variation of the font.
+ * @return The stroke variation descriptor.
+ */
+ int getStrokeVariation();
+
+ /**
+ * Describes the arm style of the font.
+ * @return The arm style descriptor.
+ */
+ int getArmStyle();
+
+ /**
+ * Describes the letterform of the font.
+ * @return The letterform descriptor.
+ */
+ int getLetterform();
+
+ /**
+ * Describes the midline of the font.
+ * @return The midline descriptor.
+ */
+ int getMidline();
+
+ /**
+ * Describes the x-height of the font.
+ * @return The x-height descriptor.
+ */
+ int getXheight();
+
+ /**
+ * Panose being an array of 10 values, this method returns the value at a specific index (0-9).
+ * @param index The index whose value should be returned.
+ * @return The value at {@code index}.
+ */
+ int getValueAt(int index);
+
+}
Property changes on: trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose4a.java 2025-05-09 22:58:05 UTC (rev 13644)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/Panose4a.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -29,7 +29,6 @@
package org.foray.font.format;
import org.axsl.font.FontException;
-import org.axsl.font.Panose;
import org.checkerframework.checker.signedness.qual.Unsigned;
Modified: trunk/foray/foray-font/src/test/java/org/foray/font/ttf/TrueTypeFontParserTests.java
===================================================================
--- trunk/foray/foray-font/src/test/java/org/foray/font/ttf/TrueTypeFontParserTests.java 2025-05-09 22:58:05 UTC (rev 13644)
+++ trunk/foray/foray-font/src/test/java/org/foray/font/ttf/TrueTypeFontParserTests.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -32,6 +32,7 @@
import org.foray.font.FontServer4a;
import org.foray.font.format.FontContent;
import org.foray.font.format.FontParser;
+import org.foray.font.format.Panose;
import org.foray.font.format.Panose4a;
import org.foray.font.ttf.table.BaseAxisTable;
import org.foray.font.ttf.table.BaseScriptTable;
@@ -44,7 +45,6 @@
import org.foray.fontParse.ttf.TtfRandomAccessInput;
import org.axsl.font.FontException;
-import org.axsl.font.Panose;
import org.axsl.ps.BoundingBox;
import org.checkerframework.checker.signedness.qual.Unsigned;
Modified: trunk/foray/foray-font-tf/src/main/java/org/foray/font/fixture/MockFont.java
===================================================================
--- trunk/foray/foray-font-tf/src/main/java/org/foray/font/fixture/MockFont.java 2025-05-09 22:58:05 UTC (rev 13644)
+++ trunk/foray/foray-font-tf/src/main/java/org/foray/font/fixture/MockFont.java 2025-05-10 00:10:08 UTC (rev 13645)
@@ -29,7 +29,6 @@
package org.foray.font.fixture;
import org.axsl.font.Font;
-import org.axsl.font.Panose;
import org.axsl.i18n.Script;
import org.axsl.ps.BoundingBox;
import org.axsl.ps.CharSet;
@@ -220,12 +219,6 @@
}
@Override
- public Panose getPanose() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
public BoundingBox getBoundingBox() {
// TODO Auto-generated method stub
return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-09 22:58:09
|
Revision: 13644
http://sourceforge.net/p/foray/code/13644
Author: victormote
Date: 2025-05-09 22:58:05 +0000 (Fri, 09 May 2025)
Log Message:
-----------
Conform to aXSL change: Remove Panose selection method and font size parameter for selecting fonts.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontSelector.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2025-05-09 17:05:01 UTC (rev 13643)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2025-05-09 22:58:05 UTC (rev 13644)
@@ -1247,11 +1247,10 @@
final FontWeight fontWeight = foNeedingFont.traitFontWeight(this);
final FontVariant fontVariant = foNeedingFont.traitFontVariant(this);
final FontStretch fontStretch = foNeedingFont.traitFontStretch(this);
- final int foFontSize = foNeedingFont.traitFontSize(this);
final FontConsumer fontConsumer = getAreaTree().getFontConsumer();
final FontUse resolvedFont = fontConsumer.selectFontXsl(fontSelectionStrategy, foFontFamily, fontStyle,
- fontWeight, fontVariant, fontStretch, foFontSize, firstChar);
+ fontWeight, fontVariant, fontStretch, firstChar);
if (resolvedFont == null) {
getAreaTree().logError("Error creating Font.\n" + ((Fo) foNeedingFont).getContextMessage());
}
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-09 17:05:01 UTC (rev 13643)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-09 22:58:05 UTC (rev 13644)
@@ -230,9 +230,9 @@
final FontSelectionStrategy selectionStrategy,
final List<String> familyList, final FontStyle style,
final FontWeight weight, final FontVariant variant,
- final FontStretch stretch, final int size, final int codePoint) {
+ final FontStretch stretch, final int codePoint) {
final FontSelector selector = getFontSelector(selectionStrategy);
- final RegisteredFont fontDescSelected = selector.selectFont(familyList, style, weight, variant, stretch, size,
+ final RegisteredFont fontDescSelected = selector.selectFont(familyList, style, weight, variant, stretch,
codePoint);
if (fontDescSelected == null) {
final StringBuilder builder = new StringBuilder();
@@ -429,13 +429,10 @@
}
@Override
- public org.axsl.font.FontUse selectFontCss(final List<String> familyList,
- final FontStyle style, final FontWeight weight,
- final FontVariant variant, final FontStretch stretch,
- final int size, final int codePoint) {
- return selectFontXsl(FontSelectionStrategy.CHARACTER_BY_CHARACTER,
- familyList, style, weight,
- variant, stretch, size, codePoint);
+ public org.axsl.font.FontUse selectFontCss(final List<String> familyList, final FontStyle style,
+ final FontWeight weight, final FontVariant variant, final FontStretch stretch, final int codePoint) {
+ return selectFontXsl(FontSelectionStrategy.CHARACTER_BY_CHARACTER, familyList, style, weight, variant, stretch,
+ codePoint);
}
@Override
@@ -556,7 +553,20 @@
this.encodingLatitude = (byte) encodingLatitude;
}
- @Override
+ /**
+ * Accepts the client's PANOSE description of the desired font, and returns the best-fitting Font found.
+ * @param panose The 10-element PANOSE description of the desired font.
+ * @param codePoint The first character to be painted using the selected {@link FontUse}.
+ * This allows the selection process to avoid selecting a {@link FontUse} that cannot even paint the first
+ * character.
+ * @return The best-fitting {@link FontUse} instance associated with the descriptive input, or null if none is
+ * found.
+ * @see "http://www.w3.org/Printing/stevahn.html#references"
+ * @see #selectFontXsl(Font.SelectionStrategy, List, Font.Style, Font.Weight, Font.Variant, Font.Stretch, int, int)
+ * @see #selectFontCss(List, Font.Style, Font.Weight, Font.Variant, Font.Stretch, int, int)
+ * @see #selectFontFallback(int)
+ * @see #selectFontFallback()
+ */
public FontUse selectFontPanose(final Panose panose, final int codePoint) {
final Panose4a desiredPanose;
try {
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontSelector.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontSelector.java 2025-05-09 17:05:01 UTC (rev 13643)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontSelector.java 2025-05-09 22:58:05 UTC (rev 13644)
@@ -61,13 +61,12 @@
* @param weight The font weight (100, 200, normal, bold, etc.).
* @param variant The font variant (normal, small-caps).
* @param stretch The font stretch (normal, condensed, etc.).
- * @param size The font size, in millipoints.
* This is used only for bitmapped fonts.
* @param codePoint The Unicode code point which must be encodable by the selected font.
* @return The best registered font description matching the selection criteria.
*/
public abstract RegisteredFont selectFont(List<String> familyList, FontStyle style, FontWeight weight,
- FontVariant variant, FontStretch stretch, int size, int codePoint);
+ FontVariant variant, FontStretch stretch, int codePoint);
/**
* Returns the parent font consumer instance.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java 2025-05-09 17:05:01 UTC (rev 13643)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontSelectorCbc.java 2025-05-09 22:58:05 UTC (rev 13644)
@@ -61,7 +61,7 @@
@Override
public RegisteredFont selectFont(final List<String> familyList, final FontStyle style, final FontWeight weight,
- final FontVariant variant, final FontStretch stretch, final int size, final int codePoint) {
+ final FontVariant variant, final FontStretch stretch, final int codePoint) {
Font4a fontSelected = null;
RegisteredFont fontDescSelected = null;
if (familyList == null) {
@@ -69,7 +69,7 @@
}
for (int i = 0; i < familyList.size(); i++) {
final String familyToUse = familyList.get(i);
- fontDescSelected = selectFont(familyToUse, style, weight, variant, stretch, size);
+ fontDescSelected = selectFont(familyToUse, style, weight, variant, stretch);
/* Skip this font-family if it doesn't have a font that fits. */
if (fontDescSelected == null) {
continue;
@@ -94,12 +94,11 @@
* @param weight The font weight (100, 200, normal, bold, etc.).
* @param variant The font variant (normal, small-caps).
* @param stretch The font stretch (normal, condensed, etc.).
- * @param size The font size, in millipoints.
* This is used only for bitmapped fonts.
* @return The {@link RegisteredFont} matching the selection criteria, or null if there is none.
*/
private RegisteredFont selectFont(final String familyToTry, final FontStyle style, final FontWeight weight,
- final FontVariant variant, final FontStretch stretch, final int size) {
+ final FontVariant variant, final FontStretch stretch) {
if (familyToTry == null) {
return null;
}
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java 2025-05-09 17:05:01 UTC (rev 13643)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/batik/PdfTextPainter.java 2025-05-09 22:58:05 UTC (rev 13644)
@@ -326,7 +326,6 @@
final List<?> gvtFonts = (List<?>) aci.getAttribute(
GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
- final int fsize = (int) size.floatValue();
if (gvtFonts != null) {
for (final Iterator<?> i = gvtFonts.iterator(); i.hasNext(); ) {
final GVTFontFamily fam = (GVTFontFamily) i.next();
@@ -335,7 +334,6 @@
FontUtility.foFontFamily(this.fontFamily),
style, weight, FontVariant.NORMAL,
FontStretch.NORMAL,
- fsize * TypographicConstants.MILLIPOINTS_PER_POINT,
' ');
if (font != null) {
/* TODO: Since PdfGraphics2D has moved to the foray-pdf project, this test can no longer be done.
@@ -356,7 +354,6 @@
weight,
FontVariant.NORMAL,
FontStretch.NORMAL,
- fsize * TypographicConstants.MILLIPOINTS_PER_POINT,
' ');
}
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java 2025-05-09 17:05:01 UTC (rev 13643)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java 2025-05-09 22:58:05 UTC (rev 13644)
@@ -41,7 +41,6 @@
import org.axsl.constants.NumericConstants;
import org.axsl.constants.PrimitiveConstants;
-import org.axsl.constants.TypographicConstants;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontContext;
import org.axsl.font.FontUse;
@@ -706,7 +705,6 @@
if (fontFamily.equals("sanserif")) {
fontFamily = "sans-serif";
}
- final float fontSize = gFont.getSize();
FontStyle fontStyle = FontStyle.NORMAL;
if (gFont.isItalic()) {
fontStyle = FontStyle.ITALIC;
@@ -721,7 +719,6 @@
fontStyle, fontWeight,
FontVariant.NORMAL,
FontStretch.NORMAL,
- (int) (fontSize * TypographicConstants.MILLIPOINTS_PER_POINT),
' ');
if (fontUse == null) {
fontUse = this.fontConsumer.selectFontFallback();
@@ -760,7 +757,7 @@
FontStyle.NORMAL,
FontWeight.NORMAL,
FontVariant.NORMAL,
- FontStretch.NORMAL, 0, ch);
+ FontStretch.NORMAL, ch);
if (font == null) {
font = this.fontConsumer.selectFontFallback();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-09 17:05:05
|
Revision: 13643
http://sourceforge.net/p/foray/code/13643
Author: victormote
Date: 2025-05-09 17:05:01 +0000 (Fri, 09 May 2025)
Log Message:
-----------
Conform to aXSL change: Remove more unneeded methods.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-09 16:51:35 UTC (rev 13642)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-09 17:05:01 UTC (rev 13643)
@@ -896,13 +896,22 @@
registerFontFamily2(name);
}
- @Override
+ /**
+ * Indicates whether a font-family has already been registered for use by the system.
+ * @param name The name of the font-family (e.g. "Courier").
+ * @return True if and only if the font-family is already registered.
+ */
public boolean isRegisteredFontFamily(final String name) {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(name);
return rff != null;
}
- @Override
+ /**
+ * Finds the font-family that is associated with a given font-family alias.
+ * @param alias The name of the font-family alias.
+ * @return The name of the font-family to which the alias is pointed, or null if there is no font-family alias
+ * registered for {@code alias}.
+ */
public String getFontFamilyForAlias(final String alias) {
final RegisteredFontFamily family = this.fontFamilyAliases.get(alias);
if (family == null) {
@@ -998,7 +1007,11 @@
this.registeredFontContent.put(fontID, rf);
}
- @Override
+ /**
+ * Indicates whether a font has already been registered for use by the system.
+ * @param fontID The unique font ID for the font (e.g. "Courier-Bold").
+ * @return True if and only if a font with ID of {@code fontID} is already registered.
+ */
public boolean isRegisteredFont(final String fontID) {
final Object object = this.registeredFontContent.get(fontID);
return object != null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-09 16:51:37
|
Revision: 13642
http://sourceforge.net/p/foray/code/13642
Author: victormote
Date: 2025-05-09 16:51:35 +0000 (Fri, 09 May 2025)
Log Message:
-----------
Conform to aXSL change: Remove more unneeded methods.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-09 16:32:15 UTC (rev 13641)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-09 16:51:35 UTC (rev 13642)
@@ -887,7 +887,11 @@
this.entityResolver = entityResolver;
}
- @Override
+ /**
+ * Register a font-family for use by the system.
+ * @param name The name of the font-family (e.g. "Courier").
+ * @throws FontException If the font-family is already registered.
+ */
public void registerFontFamily(final String name) throws FontException {
registerFontFamily2(name);
}
@@ -918,7 +922,18 @@
return familyName != null;
}
- @Override
+ /**
+ * Register a font for use by the system.
+ * @param fontID A unique ID for this font (e.g. "Courier-Bold").
+ * @param fontFileSource Source of the file containing the font, if any.
+ * @param metricsFileSource Source of the file containing the font metrics, if any.
+ * This is null for TrueType and OpenType fonts.
+ * @param collectionID For TrueType collections, indicates which font in the collection corresponds to this font.
+ * @param requestedEmbedding The requested font embedding for the font to be registered.
+ * @param systemName For system fonts only, this is the name that should be supplied to the operating system font
+ * registry to obtain the font from it. For other fonts, set this to null.
+ * @throws FontException If a font with this {@code fontID} is already registered.
+ */
public void registerFont(final String fontID, final URL fontFileSource, final URL metricsFileSource,
final String collectionID, final org.axsl.font.Font.Embedding requestedEmbedding, final String systemName)
throws FontException {
@@ -989,7 +1004,20 @@
return object != null;
}
- @Override
+ /**
+ * Register a font description for use by the system.
+ * @param fontFamily The name of the font-family in which this font should be registered.
+ * @param fontID The font ID for the font that should be registered.
+ * @param encoding The encoding, if any, that should be used by this font description.
+ * Set this value to null unless you wish to override the encoding for this font.
+ * @param style The font style (normal, italic, etc.).
+ * @param weight The font weight (normal, bold, etc.).
+ * @param variant The font variant (normal, small-caps, etc.).
+ * @param stretch The font stretch (normal, condensed, expanded, etc.).
+ * @param simulation Information about whether and how font features should be simulated if they are not native to
+ * the font.
+ * @throws FontException If {@code fontFamily} or {@code fontID} are not already registered.
+ */
public void registerFontDescription(final String fontFamily,
final String fontID, final Encoding encoding,
final FontStyle style,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-09 16:32:20
|
Revision: 13641
http://sourceforge.net/p/foray/code/13641
Author: victormote
Date: 2025-05-09 16:32:15 +0000 (Fri, 09 May 2025)
Log Message:
-----------
Conform to aXSL change: Remove unnecessary methods from FontServer.
Modified Paths:
--------------
trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForaySession.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java
trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java 2025-05-09 11:07:56 UTC (rev 13640)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java 2025-05-09 16:32:15 UTC (rev 13641)
@@ -143,6 +143,23 @@
throw new ForayException(e);
}
}
+
+ final Logger logger = LoggerFactory.getLogger(ForaySpecific.class);
+ final List<String> systemFontFamilies = forayFontServer.getSystemFontFamilyList();
+ if (systemFontFamilies != null) {
+ logger.debug("Java font family names:");
+ for (int i = 0; i < systemFontFamilies.size(); i++) {
+ logger.debug(" " + systemFontFamilies.get(i));
+ }
+ }
+ final List<java.awt.Font> systemFonts = forayFontServer.getSystemFontList();
+ if (systemFonts != null) {
+ logger.debug("Java font names:");
+ for (int i = 0; i < systemFonts.size(); i++) {
+ logger.debug(" " + systemFonts.get(i).getFontName());
+ }
+ }
+
return forayFontServer;
}
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/ForaySession.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/ForaySession.java 2025-05-09 11:07:56 UTC (rev 13640)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/ForaySession.java 2025-05-09 16:32:15 UTC (rev 13641)
@@ -130,7 +130,6 @@
throw new ForayException("FontServer required for ForaySession.");
}
this.fontServer = fontServer;
- setupFontServer();
/* Validate HyphenationServer. */
if (hyphenServer == null) {
@@ -193,28 +192,6 @@
}
/**
- * Sets up a FontServer instance if there is not one already.
- */
- private void setupFontServer() {
- final List<String> systemFontFamilies =
- this.fontServer.getSystemFontFamilyList();
- if (systemFontFamilies != null) {
- logDebug("Java font family names:");
- for (int i = 0; i < systemFontFamilies.size(); i++) {
- logDebug(" " + systemFontFamilies.get(i));
- }
- }
- final List<java.awt.Font> systemFonts =
- this.fontServer.getSystemFontList();
- if (systemFonts != null) {
- logDebug("Java font names:");
- for (int i = 0; i < systemFonts.size(); i++) {
- logDebug(" " + systemFonts.get(i).getFontName());
- }
- }
- }
-
- /**
* Returns the font server for this session.
* @return The FontServer instance that is being used in this session.
*/
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-09 11:07:56 UTC (rev 13640)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontConsumer4a.java 2025-05-09 16:32:15 UTC (rev 13641)
@@ -239,10 +239,10 @@
for (int i = 0; i < familyList.size(); i++) {
builder.append(familyList.get(i) + ", ");
}
- builder.append(style.toString() + ", ");
- builder.append(weight.toString() + ", ");
- builder.append(variant.toString() + ", ");
- builder.append(stretch.toString() + ", ");
+ builder.append(style.toString() + " (style), ");
+ builder.append(weight.toString() + " (weight), ");
+ builder.append(variant.toString() + " (variant), ");
+ builder.append(stretch.toString() + " (stretch), ");
builder.append("U+" + Integer.toHexString(codePoint).toUpperCase());
getLogger().warn("Suitable font not found for: " + builder.toString());
return null;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-09 11:07:56 UTC (rev 13640)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontServer4a.java 2025-05-09 16:32:15 UTC (rev 13641)
@@ -793,7 +793,14 @@
}
}
- @Override
+ /**
+ * Exposes the list of font families registered with the operating system.
+ * The purpose of this method is to provide implementations with a way to report to their users the system fonts
+ * that they could possibly register, which may be useful in helping them debug font registration failure.
+ * @return The list of font families that are registered with the operating system.
+ * (Technically it is those font families available through the JVM, which is presumed to be those that are
+ * registered with the operating system).
+ */
public List<String> getSystemFontFamilyList() {
if (this.systemFontFamilyList == null) {
createSystemFontFamilyList();
@@ -801,7 +808,14 @@
return this.systemFontFamilyList;
}
- @Override
+ /**
+ * Exposes the list of fonts registered with the operating system.
+ * The purpose of this method is to provide implementations with a way to report to their users the system fonts
+ * that they could possibly register, which may be useful in helping them debug font registration failure.
+ * @return An array of fonts that are registered with the operating system.
+ * (Technically it is those fonts available through the JVM, which is presumed to be those that are registered with
+ * the operating system).
+ */
public List<java.awt.Font> getSystemFontList() {
if (! Environment.isGraphicalEnvironment()) {
getLogger().info("No graphical environment. Unable to get System fonts.");
@@ -811,7 +825,12 @@
return Arrays.asList(ge.getAllFonts());
}
- @Override
+ /**
+ * Returns a list of all Font instances.
+ * @param freeStandingFonts Set to true to include free-standing fonts in the returned array.
+ * @param systemFonts Set to true to include system fonts in the returned array.
+ * @return The array of all Font instances.
+ */
public List<Font4a> getAllFonts(final boolean freeStandingFonts, final boolean systemFonts) {
final List<Font4a> fontList = new ArrayList<Font4a>();
for (RegisteredFontFamily family : this.fontFamilies.values()) {
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java 2025-05-09 11:07:56 UTC (rev 13640)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFont.java 2025-05-09 16:32:15 UTC (rev 13641)
@@ -433,8 +433,7 @@
}
/**
- * Indicates whether this font description matches a given set of criteria,
- * withour regard to the font-weight.
+ * Indicates whether this font description matches a given set of criteria, without regard to the font-weight.
* @param family The desired font-family.
* @param considerSimulated Indicates whether simulated features should be
* considered in this selection.
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java 2025-05-09 11:07:56 UTC (rev 13640)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/RegisteredFontFamily.java 2025-05-09 16:32:15 UTC (rev 13641)
@@ -121,45 +121,37 @@
}
/**
- * This method encapsulates the "per-descriptor matching rules" described in
- * the CSS 2 documentation at Section 15.5.
+ * This method encapsulates the "per-descriptor matching rules" described in the CSS 2 documentation at Section
+ * 15.5.
* @param style The font-style constant requested.
* @param weight The font-weight constant requested.
* @param variant The font-variant constant requested.
* @param stretch The font-stretch constant requested.
- * @param freeStandingFonts Indicates whether free-standing fonts can be
- * considered in this selection.
- * @param systemFonts Indicates whether system fonts can be considered in
- * this selection.
- * @return The first matching RegisteredFontDesc found for this font-family,
- * or null if none match.
+ * @param freeStandingFonts Indicates whether free-standing fonts can be considered in this selection.
+ * @param systemFonts Indicates whether system fonts can be considered in this selection.
+ * @return The first matching RegisteredFontDesc found for this font-family, or null if none match.
*/
public RegisteredFont findRegisteredFontDesc(final FontStyle style,
final FontWeight weight, final FontVariant variant,
final FontStretch stretch, final boolean freeStandingFonts,
final boolean systemFonts) {
- /* According to the CSS2 Recommendation, Section 15.5, weight will never
- * cause the failure of a font-family to select a font.
- * So the algorigthm here finds those fonts that match the parameters
- * without regard to weight, then among those, finds the one that
- * matches the weight criteria the best.
+ /* According to the CSS2 Recommendation, Section 15.5, weight will never cause the failure of a font-family to
+ * select a font.
+ * So the algorigthm here finds those fonts that match the parameters without regard to weight, then among
+ * those, finds the one that matches the weight criteria the best.
*
* This algorithm may not be perfect for the following reasons:
- * 1. The CSS ans XSL-FO Recommendations are silent on the issue of
- * how font-stretch affects the selection. We have included it in the
- * factors that need to match for the font to be considered.
- * 2. The XSL-FO Recommendations indicates that, if the weight 500 is
- * unassigned, it should be assigned the same font that 400 is.
- * This algorithm treats it the same as 600, 700, 800, and 900, that
- * is, it is assigned the next darker assigned keyword, if any, or
- * the next lightest otherwise. */
+ * 1. The CSS ans XSL-FO Recommendations are silent on the issue of how font-stretch affects the selection.
+ * We have included it in the factors that need to match for the font to be considered.
+ * 2. The XSL-FO Recommendations indicates that, if the weight 500 is unassigned, it should be assigned the same
+ * font that 400 is.
+ * This algorithm treats it the same as 600, 700, 800, and 900, that is, it is assigned the next darker
+ * assigned keyword, if any, or the next lightest otherwise. */
- final RegisteredFont[] matches =
- new RegisteredFont[RegisteredFontFamily.QTY_WEIGHT_VALUES];
+ final RegisteredFont[] matches = new RegisteredFont[RegisteredFontFamily.QTY_WEIGHT_VALUES];
RegisteredFont bestMatch = null;
- /* First, look for a perfect match without considering simulated
- * features. */
+ /* First, look for a perfect match without considering simulated features. */
for (int i = 0; i < this.fontDescriptions.size(); i++) {
final RegisteredFont fd = this.fontDescriptions.get(i);
if (fd.matchIgnoreWeight(this, false, style, variant, stretch, freeStandingFonts, systemFonts)) {
@@ -172,8 +164,7 @@
return bestMatch;
}
- /* Next, look for a perfect match that does consider the simulated
- * features. */
+ /* Next, look for a perfect match that does consider the simulated features. */
for (int i = 0; i < this.fontDescriptions.size(); i++) {
final RegisteredFont fd = this.fontDescriptions.get(i);
if (fd.matchPerfect(this, true, style, weight, variant, stretch, freeStandingFonts, systemFonts)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-09 11:08:00
|
Revision: 13640
http://sourceforge.net/p/foray/code/13640
Author: victormote
Date: 2025-05-09 11:07:56 +0000 (Fri, 09 May 2025)
Log Message:
-----------
Conform to aXSL change: Reverse previous change that added FoContext method to support the "auto" value of the "script" property. Improvements to parsing, storage, and retrieval of the "script" property and its value.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtScript.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScript.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -31,7 +31,6 @@
import org.foray.area.link.Link;
import org.foray.area.link.LinkFactory;
import org.foray.common.data.AbstractOrderedTreeNode;
-import org.foray.common.i18n.Script4a;
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
@@ -48,7 +47,6 @@
import org.axsl.fotree.role.NormalBlockAreaGenerator;
import org.axsl.galley.AreaNodeG5;
import org.axsl.galley.Galley;
-import org.axsl.i18n.Script;
import org.axsl.orthography.Orthography;
import org.axsl.value.BaselineIdentifier;
import org.axsl.value.LinefeedTreatment;
@@ -910,10 +908,4 @@
// return null;
// }
- @Override
- public Script autoScript() {
- /* TODO: Implement this. */
- return Script4a.UNDETERMINED;
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -2769,30 +2769,9 @@
return getPropertyList().traitStress(this, context);
}
- /**
- * Returns the raw, unresolved "script" property.
- * @param context An object that knows how to resolve FO context issues.
- * @return The raw, unresolved "script" property.
- */
- public String traitScriptRaw(final FoContext context) {
- return getPropertyList().traitScript(this, context);
- }
-
@Override
public Script4a traitScript(final FoContext context) {
- final String rawScript = traitScriptRaw(context);
- if ("auto".equals(rawScript)) {
- return getAutoScript();
- }
- if ("none".equals(rawScript)) {
- return Script4a.UNDETERMINED;
- }
- final Script4a iso15924 = Script4a.findFromAlpha(rawScript);
- if (iso15924 == null) {
- return Script4a.UNDETERMINED;
- } else {
- return iso15924;
- }
+ return getPropertyList().traitScript(this, context);
}
/**
@@ -2799,10 +2778,9 @@
* Computes the script to be used for this object based on its content.
* @return The content-based script for this object.
*/
- protected Script4a getAutoScript() {
- /*TODO: This is incorrect. See XSL-FO 1.1, Section 7.10.3 for the
- * algorithm. */
- return Script4a.UNDETERMINED;
+ public Script4a getAutoScript() {
+ /*TODO: This is incorrect, a stopgap. See XSL-FO 1.1, Section 7.10.3 for the algorithm. */
+ return Script4a.LATIN;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -30,6 +30,7 @@
import org.foray.common.i18n.Country4a;
import org.foray.common.i18n.Language4a;
+import org.foray.common.i18n.Script4a;
import org.foray.fotree.fo.FoKeyword;
import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.datatype.DtTextDeco;
@@ -4236,12 +4237,12 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The script property.
*/
- public String traitScript(final FoObj fobj, final FoContext context) {
+ public Script4a traitScript(final FoObj fobj, final FoContext context) {
final PdScript property = (PdScript) getProperty(FoPropertyId.SCRIPT);
if (property != null) {
return property.getValue(context, fobj);
}
- return PdScript.getValueNoInstance(context, fobj);
+ return fobj.getAutoScript();
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtScript.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtScript.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtScript.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -28,158 +28,68 @@
package org.foray.fotree.fo.datatype;
-import java.util.Arrays;
+import org.foray.common.i18n.Script4a;
+import org.axsl.i18n.Script;
+
+import java.util.HashMap;
+import java.util.Map;
+
/**
- * A "script" datatype in XSL-FO. Scripts must conform to the ISO
- * 15924 script codes.
+ * A "script" datatype in XSL-FO.
+ * Scripts must conform to the ISO 15924 script codes.
*/
-public class DtScript extends Datatype {
+public final class DtScript extends Datatype {
- /**
- * This list is derived from
- * http://www.unicode.org/iso15924/iso15924-codes.html,
- * which also contains the mappings to scripts names and number codes.
- * This list should be maintained in alphabetical order so that a binary
- * search can be used.
- */
- public static final String[] VALID_SCRIPTS = {
- "Arab",
- "Armn",
- "Bali",
- "Batk",
- "Beng",
- "Blis",
- "Bopo",
- "Brah",
- "Brai",
- "Bugi",
- "Buhd",
- "Cans",
- "Cham",
- "Cher",
- "Cirt",
- "Copt",
- "Cprt",
- "Cyrl",
- "Cyrs",
- "Deva",
- "Dsrt",
- "Egyd",
- "Egyh",
- "Egyp",
- "Ethi",
- "Geor",
- "Glag",
- "Goth",
- "Grek",
- "Gujr",
- "Guru",
- "Hang",
- "Hani",
- "Hano",
- "Hans",
- "Hant",
- "Hebr",
- "Hira",
- "Hmng",
- "Hrkt",
- "Hung",
- "Inds",
- "Ital",
- "Java",
- "Kali",
- "Kana",
- "Khar",
- "Khmr",
- "Knda",
- "Laoo",
- "Latf",
- "Latg",
- "Latn",
- "Lepc",
- "Limb",
- "Lina",
- "Linb",
- "Mand",
- "Maya",
- "Mero",
- "Mlym",
- "Mong",
- "Mymr",
- "Ogam",
- "Orkh",
- "Orya",
- "Osma",
- "Perm",
- "Phag",
- "Phnx",
- "Plrd",
- "Qaaa",
- "Qabx",
- "Roro",
- "Runr",
- "Sara",
- "Shaw",
- "Sinh",
- "Sylo",
- "Syrc",
- "Syre",
- "Syrj",
- "Syrn",
- "Tagb",
- "Tale",
- "Talu",
- "Taml",
- "Telu",
- "Teng",
- "Tfng",
- "Tglg",
- "Thaa",
- "Thai",
- "Tibt",
- "Ugar",
- "Vaii",
- "Visp",
- "Xpeo",
- "Xsux",
- "Yiii",
- "Zxxx",
- "Zyyy",
- "Zzzz",
- };
+ /** The map of ISO codes to DtScript instances that encapsulate the ISO codes. */
+ private static Map<Script, DtScript> scriptMap = new HashMap<Script, DtScript>();
- /** The 4-character ISO 15924 code. */
- private String value = null;
+ /** The ISO 15924 code. */
+ private Script4a value = null;
/**
- * Constructor.
- * @param value The 4-character script identifier.
+ * Private Constructor. To obtain an instance of this class, use {@link #fromToken(String)} or
+ * {@link #fromScript(Script)}.
+ * @param value The country code.
*/
- public DtScript(final String value) {
+ private DtScript(final Script4a value) {
this.value = value;
}
/**
* Return the value.
- * @return The String value of this script.
+ * @return The value of this number.
*/
- public String getValue() {
+ public Script4a getValue() {
return this.value;
}
+
/**
- * Determines whether a given script code is found in validScripts.
- * @param scriptCode A 4-character ISO 15924 code.
- * @return True if scriptCode is found in validScripts, false otherwise.
+ * Convert a String script descriptor to its DtScript equivalent.
+ * @param token The String script descriptor to be converted.
+ * @return The DtScript instance for {@code scriptCode}.
*/
- public static boolean validScript(final String scriptCode) {
- final int index = Arrays.binarySearch(DtScript.VALID_SCRIPTS,
- scriptCode);
- if (index >= 0) {
- return true;
+ public static DtScript fromToken(final String token) {
+ final Script4a script = Script4a.findFromAlpha(token);
+ return fromScript(script);
+ }
+
+ /**
+ * Finds the {@link DtScript} for a given {@link Script} code.
+ * @param script The script to be converted.
+ * @return The DtScript instance for {@code scriptCode}.
+ */
+ public static DtScript fromScript(final Script4a script) {
+ if (script == null) {
+ return null;
}
- return false;
+ DtScript dtScript = DtScript.scriptMap.get(script);
+ if (dtScript == null) {
+ dtScript = new DtScript(script);
+ DtScript.scriptMap.put(script, dtScript);
+ }
+ return dtScript;
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -30,9 +30,11 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyList;
import org.foray.fotree.fo.AbstractFoProperty;
import org.foray.fotree.fo.FoKeyword;
import org.foray.fotree.fo.FoPropertyId;
+import org.foray.fotree.fo.PvKeywordFo;
import org.foray.fotree.value.PropertyValue;
import org.axsl.fotree.FoContext;
@@ -143,11 +145,16 @@
*/
private static BaselineIdentifier computeAuto(final FoContext context, final FoObj fobj) {
if (fobj instanceof FoText) {
- if ("auto".equals(fobj.getParent().traitScriptRaw(context))) {
- return fobj.getParent().traitDominantBaseline(context);
- } else {
- return computeFromScript(context, fobj);
+ final PropertyList propertyList = fobj.getParent().getPropertyList();
+ final PdScript scriptProperty = (PdScript) propertyList.getProperty(FoPropertyId.SCRIPT);
+ final PropertyValue value = scriptProperty.value();
+ if (value instanceof PvKeywordFo) {
+ final FoKeyword keyword = ((PvKeywordFo) value).getValue();
+ if (keyword == FoKeyword.AUTO) {
+ return fobj.getParent().traitDominantBaseline(context);
+ }
}
+ return computeFromScript(context, fobj);
} else {
return computeBaseline(context, fobj);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScript.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScript.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdScript.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -28,6 +28,7 @@
package org.foray.fotree.fo.prop;
+import org.foray.common.i18n.Script4a;
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.AbstractFoProperty;
@@ -79,8 +80,10 @@
if (pv.canEvalKeyword()) {
return pv;
}
- if (DtScript.validScript(value)) {
- return new DtScript(value);
+ final DtScript dtScript = DtScript.fromToken(value);
+ if (dtScript != null
+ && dtScript.getValue() != Script4a.UNDETERMINED) {
+ return dtScript;
}
throw unexpectedValue(value);
}
@@ -91,18 +94,18 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public String getValue(final FoContext context, final FoObj fobj) {
+ public Script4a getValue(final FoContext context, final FoObj fobj) {
if (value().canEvalKeyword()) {
final FoKeyword keyword = this.convertValueToFoValue(value());
switch (keyword) {
case INHERIT: {
- return getValueNoInstance(context, fobj);
+ return fobj.getParent().traitScript(context);
}
case NONE: {
- return "";
+ return Script4a.UNDETERMINED;
}
case AUTO: {
- return PdScript.SCRIPT_AUTO;
+ return fobj.getAutoScript();
}
default: {
throw this.unexpectedRetrieval();
@@ -115,21 +118,6 @@
throw this.unexpectedRetrieval();
}
- /**
- * Returns the default (initial) value for this property.
- * @param context An object that knows how to resolve FO context issues.
- * @param fobj The FO for which this value is needed.
- * @return The initial value for this property.
- */
- public static String getValueNoInstance(final FoContext context,
- final FoObj fobj) {
- final FoObj parent = fobj.effectiveParent();
- if (parent != null) {
- return parent.getPropertyList().traitScript(parent, context);
- }
- return PdScript.SCRIPT_AUTO;
- }
-
@Override
protected FoKeyword[] getValidKeywords() {
return PdScript.VALID_KEYWORDS;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -28,7 +28,6 @@
package org.foray.fotree;
-import org.foray.common.i18n.Script4a;
import org.foray.fotree.fo.obj.Root4a;
import org.axsl.context.FontData;
@@ -198,11 +197,6 @@
return STD_FONT_DATA;
}
- @Override
- public Script autoScript() {
- return Script4a.UNDETERMINED;
- }
-
};
/** Constant providing a standard, but completely bogus context to be
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -30,6 +30,7 @@
import org.foray.common.i18n.Country4a;
import org.foray.common.i18n.Language4a;
+import org.foray.common.i18n.Script4a;
import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.NamespaceFo;
import org.foray.fotree.fo.datatype.DtCountry;
@@ -162,7 +163,7 @@
final PropertyValue value2Item3 = script.value();
assertTrue(value2Item3 instanceof DtScript);
final DtScript dtScript = (DtScript) value2Item3;
- assertEquals("Latn", dtScript.getValue());
+ assertEquals(Script4a.LATIN, dtScript.getValue());
}
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java 2025-05-08 22:04:30 UTC (rev 13639)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java 2025-05-09 11:07:56 UTC (rev 13640)
@@ -31,7 +31,6 @@
import org.axsl.context.FontData;
import org.axsl.fotree.FoContext;
import org.axsl.fotree.fo.GraftingPoint;
-import org.axsl.i18n.Script;
import org.axsl.value.BaselineIdentifier;
import org.axsl.value.LinefeedTreatment;
import org.axsl.value.TextTransform;
@@ -163,9 +162,4 @@
return this.wrappedContext.getFontData();
}
- @Override
- public Script autoScript() {
- return this.wrappedContext.autoScript();
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 22:04:33
|
Revision: 13639
http://sourceforge.net/p/foray/code/13639
Author: victormote
Date: 2025-05-08 22:04:30 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Conform to aXSL change: Add FoContext method to support the "auto" value of the "script" property.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2025-05-08 21:39:26 UTC (rev 13638)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2025-05-08 22:04:30 UTC (rev 13639)
@@ -31,6 +31,7 @@
import org.foray.area.link.Link;
import org.foray.area.link.LinkFactory;
import org.foray.common.data.AbstractOrderedTreeNode;
+import org.foray.common.i18n.Script4a;
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
@@ -47,6 +48,7 @@
import org.axsl.fotree.role.NormalBlockAreaGenerator;
import org.axsl.galley.AreaNodeG5;
import org.axsl.galley.Galley;
+import org.axsl.i18n.Script;
import org.axsl.orthography.Orthography;
import org.axsl.value.BaselineIdentifier;
import org.axsl.value.LinefeedTreatment;
@@ -908,4 +910,10 @@
// return null;
// }
+ @Override
+ public Script autoScript() {
+ /* TODO: Implement this. */
+ return Script4a.UNDETERMINED;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2025-05-08 21:39:26 UTC (rev 13638)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2025-05-08 22:04:30 UTC (rev 13639)
@@ -28,6 +28,7 @@
package org.foray.fotree;
+import org.foray.common.i18n.Script4a;
import org.foray.fotree.fo.obj.Root4a;
import org.axsl.context.FontData;
@@ -197,6 +198,11 @@
return STD_FONT_DATA;
}
+ @Override
+ public Script autoScript() {
+ return Script4a.UNDETERMINED;
+ }
+
};
/** Constant providing a standard, but completely bogus context to be
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java 2025-05-08 21:39:26 UTC (rev 13638)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/OverrideGraftingContext.java 2025-05-08 22:04:30 UTC (rev 13639)
@@ -31,6 +31,7 @@
import org.axsl.context.FontData;
import org.axsl.fotree.FoContext;
import org.axsl.fotree.fo.GraftingPoint;
+import org.axsl.i18n.Script;
import org.axsl.value.BaselineIdentifier;
import org.axsl.value.LinefeedTreatment;
import org.axsl.value.TextTransform;
@@ -162,4 +163,9 @@
return this.wrappedContext.getFontData();
}
+ @Override
+ public Script autoScript() {
+ return this.wrappedContext.autoScript();
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 21:39:29
|
Revision: 13638
http://sourceforge.net/p/foray/code/13638
Author: victormote
Date: 2025-05-08 21:39:26 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Improvements to Language parsing, storage, and retrieval.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtCountry.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtLanguage.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCountry.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLanguage.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2025-05-08 17:08:12 UTC (rev 13637)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2025-05-08 21:39:26 UTC (rev 13638)
@@ -1764,13 +1764,7 @@
@Override
public Language4a traitLanguage(final FoContext context) {
- final String languageCode = getPropertyList().getLanguage(this, context);
- final Language4a iso639 = Language4a.findFromAlpha(languageCode);
- if (iso639 == null) {
- return Language4a.UNDETERMINED;
- } else {
- return iso639;
- }
+ return getPropertyList().getLanguage(this, context);
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2025-05-08 17:08:12 UTC (rev 13637)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2025-05-08 21:39:26 UTC (rev 13638)
@@ -29,6 +29,7 @@
package org.foray.fotree;
import org.foray.common.i18n.Country4a;
+import org.foray.common.i18n.Language4a;
import org.foray.fotree.fo.FoKeyword;
import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.datatype.DtTextDeco;
@@ -2683,7 +2684,7 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The language property.
*/
- public String getLanguage(final FoObj fobj, final FoContext context) {
+ public Language4a getLanguage(final FoObj fobj, final FoContext context) {
PdLanguage property = (PdLanguage) getProperty(FoPropertyId.LANGUAGE);
if (property != null) {
return property.getValue(context, fobj);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtCountry.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtCountry.java 2025-05-08 17:08:12 UTC (rev 13637)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtCountry.java 2025-05-08 21:39:26 UTC (rev 13638)
@@ -42,19 +42,15 @@
*/
public final class DtCountry extends Datatype {
- /**
- * The map of ISO codes to DtCountry instances that encapsulate the ISO
- * codes.
- */
- private static Map<Country, DtCountry> countryMap =
- new HashMap<Country, DtCountry>();
+ /** The map of ISO codes to DtCountry instances that encapsulate the ISO codes. */
+ private static Map<Country, DtCountry> countryMap = new HashMap<Country, DtCountry>();
/** The ISO 3166 code. */
private Country4a value = null;
/**
- * Private Constructor. To obtain an instance of this class, use
- * {@link #makeCountryDT(String)}.
+ * Private Constructor. To obtain an instance of this class, use {@link #fromToken(String)} or
+ * {@link #fromCountry(Country)}.
* @param value The country code.
*/
private DtCountry(final Country4a value) {
@@ -74,9 +70,9 @@
* @param countryCode The String country descriptor to be converted.
* @return The DtCountry instance for {@code countryCode}.
*/
- public static DtCountry makeCountryDT(final String countryCode) {
+ public static DtCountry fromToken(final String countryCode) {
final Country4a iso3166 = Country4a.findFromAlpha(countryCode);
- return getCountryDT(iso3166);
+ return fromCountry(iso3166);
}
/**
@@ -84,7 +80,7 @@
* @param countryCode The Iso3166 country code to be converted.
* @return The DtCountry instance for {@code countryCode}.
*/
- public static DtCountry getCountryDT(final Country4a countryCode) {
+ public static DtCountry fromCountry(final Country4a countryCode) {
if (countryCode == null) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtLanguage.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtLanguage.java 2025-05-08 17:08:12 UTC (rev 13637)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/datatype/DtLanguage.java 2025-05-08 21:39:26 UTC (rev 13638)
@@ -32,21 +32,28 @@
import org.axsl.i18n.Language;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* A "language" datatype in XSL-FO.
* Languages must conform to the 2-letter or 3-letter ISO 639 codes.
* @see org.axsl.i18n.Language
*/
-public class DtLanguage extends Datatype {
+public final class DtLanguage extends Datatype {
- /** The 2-letter or 3-letter ISO 639 code. */
- private String value = null;
+ /** The map of ISO codes to DtLanguage instances that encapsulate the ISO codes. */
+ private static Map<Language, DtLanguage> languageMap = new HashMap<Language, DtLanguage>();
+ /** The ISO 639 code. */
+ private Language4a value = null;
+
/**
- * Constructor.
+ * Private Constructor. To obtain an instance of this class, use {@link #fromToken(String)} or
+ * {@link #fromLanguage(Language4a)}.
* @param value The language code.
*/
- public DtLanguage(final String value) {
+ private DtLanguage(final Language4a value) {
this.value = value;
}
@@ -54,7 +61,7 @@
* Return the value.
* @return The value of this number.
*/
- public String getValue() {
+ public Language4a getValue() {
return this.value;
}
@@ -63,17 +70,26 @@
* @param languageCode The String language descriptor to be converted.
* @return The DtLanguage instance for {@code languageCode}.
*/
- public static DtLanguage makeLanguageDT(final String languageCode) {
- final Language iso639 = Language4a.findFromAlpha(languageCode);
- if (iso639 == null) {
+ public static DtLanguage fromToken(final String languageCode) {
+ final Language4a iso639 = Language4a.findFromAlpha(languageCode);
+ return fromLanguage(iso639);
+ }
+
+ /**
+ * Finds the {@link DtLanguage} for a given {@link Language} code.
+ * @param languageCode The Iso639 language code to be converted.
+ * @return The DtLanguage instance for {@code languageCode}.
+ */
+ public static DtLanguage fromLanguage(final Language4a languageCode) {
+ if (languageCode == null) {
return null;
}
- return new DtLanguage(languageCode);
+ DtLanguage dtLanguage = DtLanguage.languageMap.get(languageCode);
+ if (dtLanguage == null) {
+ dtLanguage = new DtLanguage(languageCode);
+ DtLanguage.languageMap.put(languageCode, dtLanguage);
+ }
+ return dtLanguage;
}
- @Override
- public String toString() {
- return this.getValue();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCountry.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCountry.java 2025-05-08 17:08:12 UTC (rev 13637)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdCountry.java 2025-05-08 21:39:26 UTC (rev 13638)
@@ -83,7 +83,7 @@
if (pv.canEvalKeyword()) {
return pv;
}
- final DtCountry dtCountry = DtCountry.makeCountryDT(value);
+ final DtCountry dtCountry = DtCountry.fromToken(value);
if (dtCountry != null
&& dtCountry.getValue() != Country4a.NOT_SPECIFIED) {
return dtCountry;
@@ -124,8 +124,7 @@
* @param fobj The FO for which this value is needed.
* @return The initial value for this property.
*/
- public static Country4a getValueNoInstance(final FoContext context,
- final FoObj fobj) {
+ public static Country4a getValueNoInstance(final FoContext context, final FoObj fobj) {
final FoObj parent = fobj.effectiveParent();
if (parent != null) {
return parent.getPropertyList().getCountry(parent, context);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLanguage.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLanguage.java 2025-05-08 17:08:12 UTC (rev 13637)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdLanguage.java 2025-05-08 21:39:26 UTC (rev 13638)
@@ -28,6 +28,7 @@
package org.foray.fotree.fo.prop;
+import org.foray.common.i18n.Language4a;
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.AbstractFoProperty;
@@ -82,7 +83,7 @@
if (pv.canEvalKeyword()) {
return pv;
}
- final DtLanguage dtLanguage = DtLanguage.makeLanguageDT(value);
+ final DtLanguage dtLanguage = DtLanguage.fromToken(value);
if (dtLanguage != null) {
return dtLanguage;
}
@@ -95,7 +96,7 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public String getValue(final FoContext context, final FoObj fobj) {
+ public Language4a getValue(final FoContext context, final FoObj fobj) {
if (value().canEvalKeyword()) {
final FoKeyword keyword = this.convertValueToFoValue(value());
switch (keyword) {
@@ -103,7 +104,7 @@
return getValueNoInstance(context, fobj);
}
case NONE: {
- return "";
+ return Language4a.UNDETERMINED;
}
default: {
break;
@@ -122,13 +123,12 @@
* @param fobj The FO for which this value is needed.
* @return The initial value for this property.
*/
- public static String getValueNoInstance(final FoContext context,
- final FoObj fobj) {
+ public static Language4a getValueNoInstance(final FoContext context, final FoObj fobj) {
final FoObj parent = fobj.effectiveParent();
if (parent != null) {
return parent.getPropertyList().getLanguage(parent, context);
}
- return "";
+ return Language4a.UNDETERMINED;
}
@Override
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 17:08:12 UTC (rev 13637)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 21:39:26 UTC (rev 13638)
@@ -29,6 +29,7 @@
package org.foray.fotree;
import org.foray.common.i18n.Country4a;
+import org.foray.common.i18n.Language4a;
import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.NamespaceFo;
import org.foray.fotree.fo.datatype.DtCountry;
@@ -143,7 +144,7 @@
final PropertyValue value2Item1 = language.value();
assertTrue(value2Item1 instanceof DtLanguage);
final DtLanguage dtLanguage = (DtLanguage) value2Item1;
- assertEquals("spa", dtLanguage.getValue());
+ assertEquals(Language4a.SPANISH, dtLanguage.getValue());
final Property countryProperty = shorthand.findProperty(FoPropertyId.COUNTRY);
assertNotNull(countryProperty);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 17:08:15
|
Revision: 13637
http://sourceforge.net/p/foray/code/13637
Author: victormote
Date: 2025-05-08 17:08:12 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Add test of properties from two namespaces coexisting in a property list.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 15:07:59 UTC (rev 13636)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 17:08:12 UTC (rev 13637)
@@ -28,10 +28,23 @@
package org.foray.fotree;
+import org.foray.common.i18n.Country4a;
+import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.NamespaceFo;
+import org.foray.fotree.fo.datatype.DtCountry;
+import org.foray.fotree.fo.datatype.DtLanguage;
+import org.foray.fotree.fo.datatype.DtName;
+import org.foray.fotree.fo.datatype.DtScript;
import org.foray.fotree.fo.datatype.DtSpace;
+import org.foray.fotree.fo.prop.PdCountry;
+import org.foray.fotree.fo.prop.PdFontFamily;
+import org.foray.fotree.fo.prop.PdLanguage;
+import org.foray.fotree.fo.prop.PdScript;
import org.foray.fotree.fo.prop.PdSpaceBefore;
import org.foray.fotree.value.PropertyValue;
+import org.foray.fotree.value.PvShorthandSubproperties;
+import org.foray.fotree.value.ValueCollection;
+import org.foray.fotree.xml.prop.Lang;
import org.axsl.constants.TypographicConstants;
import org.axsl.constants.XmlConstants;
@@ -45,6 +58,8 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
+import javax.xml.XMLConstants;
+
/**
* Tests of {@Link PropertyList}.
*/
@@ -56,7 +71,6 @@
*/
@Test
public void checkCompoundPropertyUpdate() throws PropertyException, FoTreeException {
-
final AttributesImpl attlist = new AttributesImpl();
attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before.conditionality", null, null, "retain");
attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before.precedence", null, null, "4");
@@ -85,4 +99,69 @@
assertEquals(4, space.getPrecedence());
}
+ /**
+ * Test of the coexistence of attributes from multiple namespaces.
+ * @throws FoTreeException Not expected here.
+ */
+ @Test
+ public void testMultipleNamespaces() throws FoTreeException {
+ final AttributesImpl attlist = new AttributesImpl();
+ attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "font-family", null, null, "bogus-font-family");
+ attlist.addAttribute(XMLConstants.XML_NS_URI, "lang", null, null, "spa-MEX");
+
+ final NamespaceFo ns = NamespaceFo.getInstance();
+ final PropertyList propertyList = ns.parseAttributes(attlist, AbstractPropertyTests.STD_FO_TREE_CREATOR);
+ assertEquals(2, propertyList.qtyProperties());
+
+ final Property property1 = propertyList.getProperty(0);
+ assertNotNull(property1);
+ assertTrue(property1 instanceof PdFontFamily);
+ final PdFontFamily fontFamily = (PdFontFamily) property1;
+ final PropertyValue value1 = fontFamily.value();
+ assertTrue(value1 instanceof ValueCollection);
+ final ValueCollection collection = (ValueCollection) value1;
+ assertEquals(1, collection.getCount());
+ final PropertyValue value1Item1 = collection.getItem(0);
+ assertNotNull(value1Item1);
+ assertTrue(value1Item1 instanceof DtName);
+ final DtName name = (DtName) value1Item1;
+ assertEquals("bogus-font-family", name.getValue());
+
+ final Property property2 = propertyList.getProperty(1);
+ assertNotNull(property2);
+ assertTrue(property2 instanceof Lang);
+ final Lang lang = (Lang) property2;
+ final PropertyValue value2 = lang.value();
+ assertTrue(value2 instanceof PvShorthandSubproperties);
+ final PvShorthandSubproperties shorthand = (PvShorthandSubproperties) value2;
+ assertEquals(3, shorthand.getCount());
+
+ final Property languageProperty = shorthand.findProperty(FoPropertyId.LANGUAGE);
+ assertNotNull(languageProperty);
+ assertTrue(languageProperty instanceof PdLanguage);
+ final PdLanguage language = (PdLanguage) languageProperty;
+ final PropertyValue value2Item1 = language.value();
+ assertTrue(value2Item1 instanceof DtLanguage);
+ final DtLanguage dtLanguage = (DtLanguage) value2Item1;
+ assertEquals("spa", dtLanguage.getValue());
+
+ final Property countryProperty = shorthand.findProperty(FoPropertyId.COUNTRY);
+ assertNotNull(countryProperty);
+ assertTrue(countryProperty instanceof PdCountry);
+ final PdCountry country = (PdCountry) countryProperty;
+ final PropertyValue value2Item2 = country.value();
+ assertTrue(value2Item2 instanceof DtCountry);
+ final DtCountry dtCountry = (DtCountry) value2Item2;
+ assertEquals(Country4a.findFrom3Char("MEX"), dtCountry.getValue());
+
+ final Property scriptProperty = shorthand.findProperty(FoPropertyId.SCRIPT);
+ assertNotNull(scriptProperty);
+ assertTrue(scriptProperty instanceof PdScript);
+ final PdScript script = (PdScript) scriptProperty;
+ final PropertyValue value2Item3 = script.value();
+ assertTrue(value2Item3 instanceof DtScript);
+ final DtScript dtScript = (DtScript) value2Item3;
+ assertEquals("Latn", dtScript.getValue());
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 15:08:02
|
Revision: 13636
http://sourceforge.net/p/foray/code/13636
Author: victormote
Date: 2025-05-08 15:07:59 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Add more tests proving proper handling of the "space" compound properties.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 14:53:09 UTC (rev 13635)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 15:07:59 UTC (rev 13636)
@@ -33,8 +33,10 @@
import org.foray.fotree.fo.prop.PdSpaceBefore;
import org.foray.fotree.value.PropertyValue;
+import org.axsl.constants.TypographicConstants;
import org.axsl.constants.XmlConstants;
import org.axsl.fotree.FoTreeException;
+import org.axsl.value.Conditionality;
import org.xml.sax.helpers.AttributesImpl;
@@ -57,6 +59,8 @@
final AttributesImpl attlist = new AttributesImpl();
attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before.conditionality", null, null, "retain");
+ attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before.precedence", null, null, "4");
+ attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before.maximum", null, null, "1.75in");
attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before", null, null, "1in");
final NamespaceFo ns = NamespaceFo.getInstance();
@@ -68,6 +72,17 @@
final PdSpaceBefore spaceBeforeProperty = (PdSpaceBefore) property;
final PropertyValue propertyValue = spaceBeforeProperty.value();
assertTrue(propertyValue instanceof DtSpace);
+ final DtSpace space = (DtSpace) propertyValue;
+ /* The point size doesn't matter here because we didn't specify the sizes in ems. */
+ final int bogusPointSize = -100;
+ assertEquals(1 * TypographicConstants.MILLIPOINTS_PER_POINT * TypographicConstants.POINTS_PER_INCH,
+ space.getLengthMinimum(bogusPointSize));
+ assertEquals(1 * TypographicConstants.MILLIPOINTS_PER_POINT * TypographicConstants.POINTS_PER_INCH,
+ space.getLengthOptimum(bogusPointSize));
+ assertEquals(1.75 * TypographicConstants.MILLIPOINTS_PER_POINT * TypographicConstants.POINTS_PER_INCH,
+ space.getLengthMaximum(bogusPointSize));
+ assertEquals(Conditionality.RETAIN, space.getConditionality());
+ assertEquals(4, space.getPrecedence());
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 14:53:12
|
Revision: 13635
http://sourceforge.net/p/foray/code/13635
Author: victormote
Date: 2025-05-08 14:53:09 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Make checking for compound property updates a separate high-level namespace parsing function, so that such updates can be handled separately from property creation.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-08 14:18:43 UTC (rev 13634)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-08 14:53:09 UTC (rev 13635)
@@ -173,12 +173,19 @@
* @param attributeName The name of the attribute to be parsed.
* @param attributeValue The value of the attribute to be parsed.
* @param creator The FO Tree creation context.
- * @return The parsed property.
+ * @return The parsed property, unless a compound property was updated (instead of created), in which case null is
+ * returned, to prevent the property from being added to the list twice.
* @throws PropertyException For errors during parsing.
*/
protected Property parseAttribute(final PropertyList propertyList, final String attributeName,
final String attributeValue, final FoTreeCreator creator) throws PropertyException {
- final Property property = parseAttributeForNS(propertyList, attributeName, attributeValue, creator);
+ Property property = checkCompoundProperty(propertyList, attributeName, attributeValue);
+ if (property != null) {
+ /* The Property was updated, not created. Return null to signal that. */
+ return null;
+ }
+
+ property = parseAttributeForNS(propertyList, attributeName, attributeValue, creator);
if (property == null) {
final String message = String.format("Could not create property \"%s\" with value \"%s\".", attributeName,
attributeValue);
@@ -188,6 +195,18 @@
}
/**
+ * Checks to see if the property has already been created.
+ * If it has, and if it is a compound property, sets the value for this component.
+ * @param propertyList The propertyList which may contain an existing property.
+ * @param attributeName The full unparsed name of the property.
+ * @param attributeValue The unparsed property value.
+ * @return The parsed property.
+ * @throws PropertyException For errors in the property or its value.
+ */
+ protected abstract Property checkCompoundProperty(PropertyList propertyList, String attributeName,
+ String attributeValue) throws PropertyException;
+
+ /**
* Parses one attribute in this namespace.
* @param propertyList The list of properties for which this attribute is being parsed.
* This is needed so that a compound property can manage the possibility that its components may be specified in
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java 2025-05-08 14:18:43 UTC (rev 13634)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java 2025-05-08 14:53:09 UTC (rev 13635)
@@ -106,6 +106,12 @@
}
}
+ @Override
+ protected Property checkCompoundProperty(final PropertyList propertyList, final String attributeName,
+ final String attributeValue) throws PropertyException {
+ return null;
+ }
+
/**
* Converts a property name to its integral equivalent.
* @param inputPropertyName The property name to be enumerated.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 14:18:43 UTC (rev 13634)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 14:53:09 UTC (rev 13635)
@@ -782,10 +782,6 @@
final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(attributeName);
final FoPropertyId enumeration = enumeratePropertyName(basePropertyName);
- final Property property = checkCompoundProperty(propertyList, enumeration, attributeName, attributeValue);
- if (property != null) {
- return property;
- }
if (enumeration == null) {
throw new PropertyException("Invalid property for fo namespace: " + attributeName);
}
@@ -1615,19 +1611,11 @@
* In other words, the properties should be stored as they were originally, but the relationships between shorthand
* properties and regular properties should be evaluated as they are used. */
-
- /**
- * Checks to see if the property has already been created.
- * If it has, and if it is a compound property, sets the value for this component.
- * @param propertyList The propertyList which may contain an existing property.
- * @param enumeration The parsed property type.
- * @param attributeName The full unparsed name of the property.
- * @param attributeValue The unparsed property value.
- * @return The parsed property.
- * @throws PropertyException For errors in the property or its value.
- */
- Property checkCompoundProperty(final PropertyList propertyList, final FoPropertyId enumeration,
- final String attributeName, final String attributeValue) throws PropertyException {
+ @Override
+ protected Property checkCompoundProperty(final PropertyList propertyList, final String attributeName,
+ final String attributeValue) throws PropertyException {
+ final String basePropertyName = Property.getBasePropertyName(attributeName);
+ final FoPropertyId enumeration = enumeratePropertyName(basePropertyName);
if (enumeration == null) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java 2025-05-08 14:18:43 UTC (rev 13634)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java 2025-05-08 14:53:09 UTC (rev 13635)
@@ -86,4 +86,10 @@
return null;
}
+ @Override
+ protected Property checkCompoundProperty(final PropertyList propertyList, final String attributeName,
+ final String attributeValue) throws PropertyException {
+ return null;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java 2025-05-08 14:18:43 UTC (rev 13634)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java 2025-05-08 14:53:09 UTC (rev 13635)
@@ -95,6 +95,12 @@
}
}
+ @Override
+ protected Property checkCompoundProperty(final PropertyList propertyList, final String attributeName,
+ final String attributeValue) throws PropertyException {
+ return null;
+ }
+
/**
* Converts a property name to its integral equivalent.
* @param inputPropertyName The property name to be enumerated.
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 14:18:43 UTC (rev 13634)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 14:53:09 UTC (rev 13635)
@@ -29,6 +29,9 @@
package org.foray.fotree;
import org.foray.fotree.fo.NamespaceFo;
+import org.foray.fotree.fo.datatype.DtSpace;
+import org.foray.fotree.fo.prop.PdSpaceBefore;
+import org.foray.fotree.value.PropertyValue;
import org.axsl.constants.XmlConstants;
import org.axsl.fotree.FoTreeException;
@@ -36,7 +39,8 @@
import org.xml.sax.helpers.AttributesImpl;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.jupiter.api.Disabled;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
/**
@@ -49,7 +53,6 @@
* @throws PropertyException Not expected here.
*/
@Test
- @Disabled
public void checkCompoundPropertyUpdate() throws PropertyException, FoTreeException {
final AttributesImpl attlist = new AttributesImpl();
@@ -57,8 +60,14 @@
attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before", null, null, "1in");
final NamespaceFo ns = NamespaceFo.getInstance();
- final PropertyList list = ns.parseAttributes(attlist, AbstractPropertyTests.STD_FO_TREE_CREATOR);
- assertEquals(1, list.qtyProperties());
+ final PropertyList propertyList = ns.parseAttributes(attlist, AbstractPropertyTests.STD_FO_TREE_CREATOR);
+ assertEquals(1, propertyList.qtyProperties());
+ final Property property = propertyList.getProperty(0);
+ assertNotNull(property);
+ assertTrue(property instanceof PdSpaceBefore);
+ final PdSpaceBefore spaceBeforeProperty = (PdSpaceBefore) property;
+ final PropertyValue propertyValue = spaceBeforeProperty.value();
+ assertTrue(propertyValue instanceof DtSpace);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 14:18:45
|
Revision: 13634
http://sourceforge.net/p/foray/code/13634
Author: victormote
Date: 2025-05-08 14:18:43 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Fix message formatting.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-08 14:01:05 UTC (rev 13633)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-08 14:18:43 UTC (rev 13634)
@@ -180,7 +180,7 @@
final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final Property property = parseAttributeForNS(propertyList, attributeName, attributeValue, creator);
if (property == null) {
- final String message = String.format("Could not create property \"{}\" with value \"{}\".", attributeName,
+ final String message = String.format("Could not create property \"%s\" with value \"%s\".", attributeName,
attributeValue);
throw new PropertyException(message);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 14:01:08
|
Revision: 13633
http://sourceforge.net/p/foray/code/13633
Author: victormote
Date: 2025-05-08 14:01:05 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Change visibility on some methods. Make (disabled) property list test more primitive.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 13:02:26 UTC (rev 13632)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 14:01:05 UTC (rev 13633)
@@ -422,7 +422,7 @@
}
@Override
- public FoObj parseElementForNS(final String localName, final FoObj parent, final PropertyList propertyList)
+ protected FoObj parseElementForNS(final String localName, final FoObj parent, final PropertyList propertyList)
throws FoTreeException {
final FoObjectId enumeration = FoObjectId.xslValueOf(localName);
if (FoObjectId.ROOT == enumeration) {
@@ -778,7 +778,7 @@
}
@Override
- public Property parseAttributeForNS(final PropertyList propertyList, final String attributeName,
+ protected Property parseAttributeForNS(final PropertyList propertyList, final String attributeName,
final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(attributeName);
final FoPropertyId enumeration = enumeratePropertyName(basePropertyName);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 13:02:26 UTC (rev 13632)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 14:01:05 UTC (rev 13633)
@@ -30,6 +30,12 @@
import org.foray.fotree.fo.NamespaceFo;
+import org.axsl.constants.XmlConstants;
+import org.axsl.fotree.FoTreeException;
+
+import org.xml.sax.helpers.AttributesImpl;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -44,15 +50,15 @@
*/
@Test
@Disabled
- public void checkCompoundPropertyUpdate() throws PropertyException {
- final PropertyList list = new PropertyList(2);
+ public void checkCompoundPropertyUpdate() throws PropertyException, FoTreeException {
+
+ final AttributesImpl attlist = new AttributesImpl();
+ attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before.conditionality", null, null, "retain");
+ attlist.addAttribute(XmlConstants.XSLFO_NS_URI, "space-before", null, null, "1in");
+
final NamespaceFo ns = NamespaceFo.getInstance();
- final Property prop1 = ns.parseAttributeForNS(list, "space-before.conditionality", "retain",
- AbstractPropertyTests.STD_FO_TREE_CREATOR);
- list.addProperty(prop1);
- final Property prop2 = ns.parseAttributeForNS(list, "space-before", "1in",
- AbstractPropertyTests.STD_FO_TREE_CREATOR);
- list.addProperty(prop2);
+ final PropertyList list = ns.parseAttributes(attlist, AbstractPropertyTests.STD_FO_TREE_CREATOR);
+ assertEquals(1, list.qtyProperties());
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 13:02:29
|
Revision: 13632
http://sourceforge.net/p/foray/code/13632
Author: victormote
Date: 2025-05-08 13:02:26 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Reduce dependency on presence of FoObj. Reactivate logic that checks for compound property.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeSpace.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderSeparation.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWordSpacing.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 12:30:23 UTC (rev 13631)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 13:02:26 UTC (rev 13632)
@@ -782,10 +782,10 @@
final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(attributeName);
final FoPropertyId enumeration = enumeratePropertyName(basePropertyName);
-// final Property property = checkCompoundProperty(fobj, enumeration, attributeName, attributeValue);
-// if (property != null) {
-// return property;
-// }
+ final Property property = checkCompoundProperty(propertyList, enumeration, attributeName, attributeValue);
+ if (property != null) {
+ return property;
+ }
if (enumeration == null) {
throw new PropertyException("Invalid property for fo namespace: " + attributeName);
}
@@ -1617,9 +1617,9 @@
/**
- * Checks to see if the property has already been created. If it has, and
- * if it is a compound property, sets the value for this component.
- * @param fobj The FoObj to which this property belongs.
+ * Checks to see if the property has already been created.
+ * If it has, and if it is a compound property, sets the value for this component.
+ * @param propertyList The propertyList which may contain an existing property.
* @param enumeration The parsed property type.
* @param attributeName The full unparsed name of the property.
* @param attributeValue The unparsed property value.
@@ -1626,12 +1626,11 @@
* @return The parsed property.
* @throws PropertyException For errors in the property or its value.
*/
- Property checkCompoundProperty(final FoObj fobj, final FoPropertyId enumeration, final String attributeName,
- final String attributeValue) throws PropertyException {
+ Property checkCompoundProperty(final PropertyList propertyList, final FoPropertyId enumeration,
+ final String attributeName, final String attributeValue) throws PropertyException {
if (enumeration == null) {
return null;
}
- final PropertyList propertyList = fobj.getPropertyList();
switch (enumeration) {
case BLOCK_PROGRESSION_DIMENSION: {
final Property property = propertyList.getProperty(FoPropertyId.BLOCK_PROGRESSION_DIMENSION);
@@ -1638,7 +1637,7 @@
if (property == null) {
return null;
}
- ((PdBlockProgressionDimension) property).addComponent(fobj, attributeName, attributeValue);
+ ((PdBlockProgressionDimension) property).addComponent(attributeName, attributeValue);
return property;
}
case INLINE_PROGRESSION_DIMENSION: {
@@ -1646,7 +1645,7 @@
if (property == null) {
return null;
}
- ((PdInlineProgressionDimension) property).addComponent(fobj, attributeName, attributeValue);
+ ((PdInlineProgressionDimension) property).addComponent(attributeName, attributeValue);
return property;
}
case SPACE_AFTER: {
@@ -1656,7 +1655,7 @@
}
if (property instanceof PdSpaceAfter) {
final PdSpaceAfter spaceAfter = (PdSpaceAfter) property;
- spaceAfter.addComponent(fobj, attributeName, attributeValue);
+ spaceAfter.addComponent(attributeName, attributeValue);
return property;
} else {
throw new IllegalStateException("space-after instance is of an unexpected type.");
@@ -1669,7 +1668,7 @@
}
if (property instanceof PdSpaceBefore) {
final PdSpaceBefore spaceBefore = (PdSpaceBefore) property;
- spaceBefore.addComponent(fobj, attributeName, attributeValue);
+ spaceBefore.addComponent(attributeName, attributeValue);
return property;
} else {
throw new IllegalStateException("space-before instance is of an unexpected type.");
@@ -1682,7 +1681,7 @@
}
if (property instanceof PdSpaceEnd) {
final PdSpaceEnd spaceEnd = (PdSpaceEnd) property;
- spaceEnd.addComponent(fobj, attributeName, attributeValue);
+ spaceEnd.addComponent(attributeName, attributeValue);
return property;
} else {
throw new IllegalStateException("space-end instance is of an unexpected type.");
@@ -1695,7 +1694,7 @@
}
if (property instanceof PdSpaceStart) {
final PdSpaceStart spaceStart = (PdSpaceStart) property;
- spaceStart.addComponent(fobj, attributeName, attributeValue);
+ spaceStart.addComponent(attributeName, attributeValue);
return property;
} else {
throw new IllegalStateException("space-start instance is of an unexpected type.");
@@ -1707,7 +1706,7 @@
return null;
}
assert property instanceof PdBorderSeparation : "border-separation must be a BorderSeparation";
- ((PdBorderSeparation) property).addComponent(fobj, attributeName, attributeValue);
+ ((PdBorderSeparation) property).addComponent(attributeName, attributeValue);
return property;
}
case LETTER_SPACING: {
@@ -1725,7 +1724,7 @@
return null;
}
assert property instanceof PdWordSpacing : "word-spacing must be a WordSpacing";
- ((PdWordSpacing) property).addComponent(fobj, attributeName, attributeValue);
+ ((PdWordSpacing) property).addComponent(attributeName, attributeValue);
return property;
}
case KEEP_TOGETHER: {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java 2025-05-08 12:30:23 UTC (rev 13631)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java 2025-05-08 13:02:26 UTC (rev 13632)
@@ -192,7 +192,6 @@
/**
* Adds a component value to the compound value.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of the property, including both
* the base and the sub-property name.
* @param attributeValue The value of the component.
@@ -200,8 +199,7 @@
* pre-existing value is not the correct type.
* @throws PropertyException if the input is invalid.
*/
- public boolean addComponent(final FoObj fobj,
- final String propertyFullName, final String attributeValue)
+ public boolean addComponent(final String propertyFullName, final String attributeValue)
throws PropertyException {
if (! (value() instanceof DtLengthRange)) {
return false;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeSpace.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeSpace.java 2025-05-08 12:30:23 UTC (rev 13631)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractRelativeSpace.java 2025-05-08 13:02:26 UTC (rev 13632)
@@ -331,13 +331,12 @@
/**
* Adds a component value to the compound value.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of the property, including both the base and the sub-property name.
* @param attributeValue The value of the component.
* @return True if the component was successfully added, false if the pre-existing value is not the correct type.
* @throws PropertyException If the input is not valid.
*/
- public boolean addComponent(final FoObj fobj, final String propertyFullName, final String attributeValue)
+ public boolean addComponent(final String propertyFullName, final String attributeValue)
throws PropertyException {
if (! (value() instanceof DtSpace)) {
return false;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderSeparation.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderSeparation.java 2025-05-08 12:30:23 UTC (rev 13631)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBorderSeparation.java 2025-05-08 13:02:26 UTC (rev 13632)
@@ -174,7 +174,6 @@
/**
* Adds a component value to the compound value.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of the property, including both
* the base and the sub-property name.
* @param attributeValue The value of the component.
@@ -182,8 +181,7 @@
* pre-existing value is not the correct type.
* @throws PropertyException If the input is not valid.
*/
- public boolean addComponent(final FoObj fobj,
- final String propertyFullName, final String attributeValue)
+ public boolean addComponent(final String propertyFullName, final String attributeValue)
throws PropertyException {
/* Get the existing property value. */
if (! (value() instanceof DtLengthBpIpDirection)) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWordSpacing.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWordSpacing.java 2025-05-08 12:30:23 UTC (rev 13631)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdWordSpacing.java 2025-05-08 13:02:26 UTC (rev 13632)
@@ -232,7 +232,6 @@
/**
* Adds a component value to the compound value.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of the property, including both
* the base and the sub-property name.
* @param attributeValue The value of the component.
@@ -240,17 +239,14 @@
* pre-existing value is not the correct type.
* @throws PropertyException If the input is not valid.
*/
- public boolean addComponent(final FoObj fobj,
- final String propertyFullName, final String attributeValue)
+ public boolean addComponent(final String propertyFullName, final String attributeValue)
throws PropertyException {
if (! (value() instanceof DtSpace)) {
return false;
}
DtSpace spaceDT = (DtSpace) value();
- final String subPropertyName = Property.getSubPropertyName(
- propertyFullName);
- spaceDT = createOrAddSpace(spaceDT, attributeValue, subPropertyName,
- propertyFullName);
+ final String subPropertyName = Property.getSubPropertyName(propertyFullName);
+ spaceDT = createOrAddSpace(spaceDT, attributeValue, subPropertyName, propertyFullName);
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 12:30:25
|
Revision: 13631
http://sourceforge.net/p/foray/code/13631
Author: victormote
Date: 2025-05-08 12:30:23 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Reduce dependency on presence of FoObj.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 12:14:38 UTC (rev 13630)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 12:30:23 UTC (rev 13631)
@@ -1626,16 +1626,15 @@
* @return The parsed property.
* @throws PropertyException For errors in the property or its value.
*/
- Property checkCompoundProperty(
- final FoObj fobj, final FoPropertyId enumeration,
- final String attributeName, final String attributeValue)
- throws PropertyException {
+ Property checkCompoundProperty(final FoObj fobj, final FoPropertyId enumeration, final String attributeName,
+ final String attributeValue) throws PropertyException {
if (enumeration == null) {
return null;
}
+ final PropertyList propertyList = fobj.getPropertyList();
switch (enumeration) {
case BLOCK_PROGRESSION_DIMENSION: {
- final Property property = getProperty(fobj, FoPropertyId.BLOCK_PROGRESSION_DIMENSION);
+ final Property property = propertyList.getProperty(FoPropertyId.BLOCK_PROGRESSION_DIMENSION);
if (property == null) {
return null;
}
@@ -1643,7 +1642,7 @@
return property;
}
case INLINE_PROGRESSION_DIMENSION: {
- final Property property = getProperty(fobj, FoPropertyId.INLINE_PROGRESSION_DIMENSION);
+ final Property property = propertyList.getProperty(FoPropertyId.INLINE_PROGRESSION_DIMENSION);
if (property == null) {
return null;
}
@@ -1651,7 +1650,7 @@
return property;
}
case SPACE_AFTER: {
- final Property property = getProperty(fobj, FoPropertyId.SPACE_AFTER);
+ final Property property = propertyList.getProperty(FoPropertyId.SPACE_AFTER);
if (property == null) {
return null;
}
@@ -1664,7 +1663,7 @@
}
}
case SPACE_BEFORE: {
- final Property property = getProperty(fobj, FoPropertyId.SPACE_BEFORE);
+ final Property property = propertyList.getProperty(FoPropertyId.SPACE_BEFORE);
if (property == null) {
return null;
}
@@ -1677,7 +1676,7 @@
}
}
case SPACE_END: {
- final Property property = getProperty(fobj, FoPropertyId.SPACE_END);
+ final Property property = propertyList.getProperty(FoPropertyId.SPACE_END);
if (property == null) {
return null;
}
@@ -1690,7 +1689,7 @@
}
}
case SPACE_START: {
- final Property property = getProperty(fobj, FoPropertyId.SPACE_START);
+ final Property property = propertyList.getProperty(FoPropertyId.SPACE_START);
if (property == null) {
return null;
}
@@ -1703,7 +1702,7 @@
}
}
case BORDER_SEPARATION: {
- final Property property = getProperty(fobj, FoPropertyId.BORDER_SEPARATION);
+ final Property property = propertyList.getProperty(FoPropertyId.BORDER_SEPARATION);
if (property == null) {
return null;
}
@@ -1712,7 +1711,7 @@
return property;
}
case LETTER_SPACING: {
- final Property property = getProperty(fobj, FoPropertyId.LETTER_SPACING);
+ final Property property = propertyList.getProperty(FoPropertyId.LETTER_SPACING);
if (property == null) {
return null;
}
@@ -1721,7 +1720,7 @@
return property;
}
case WORD_SPACING: {
- final Property property = getProperty(fobj, FoPropertyId.WORD_SPACING);
+ final Property property = propertyList.getProperty(FoPropertyId.WORD_SPACING);
if (property == null) {
return null;
}
@@ -1730,7 +1729,7 @@
return property;
}
case KEEP_TOGETHER: {
- final Property property = getProperty(fobj, FoPropertyId.KEEP_TOGETHER);
+ final Property property = propertyList.getProperty(FoPropertyId.KEEP_TOGETHER);
if (property == null) {
return null;
}
@@ -1739,7 +1738,7 @@
return property;
}
case KEEP_WITH_NEXT: {
- final Property property = getProperty(fobj, FoPropertyId.KEEP_WITH_NEXT);
+ final Property property = propertyList.getProperty(FoPropertyId.KEEP_WITH_NEXT);
if (property == null) {
return null;
}
@@ -1748,7 +1747,7 @@
return property;
}
case KEEP_WITH_PREVIOUS: {
- final Property property = getProperty(fobj, FoPropertyId.KEEP_WITH_PREVIOUS);
+ final Property property = propertyList.getProperty(FoPropertyId.KEEP_WITH_PREVIOUS);
if (property == null) {
return null;
}
@@ -1757,7 +1756,7 @@
return property;
}
case LINE_HEIGHT: {
- final Property property = getProperty(fobj, FoPropertyId.LINE_HEIGHT);
+ final Property property = propertyList.getProperty(FoPropertyId.LINE_HEIGHT);
if (property == null) {
return null;
}
@@ -1766,7 +1765,7 @@
return property;
}
case LEADER_LENGTH: {
- final Property property = getProperty(fobj, FoPropertyId.LEADER_LENGTH);
+ final Property property = propertyList.getProperty(FoPropertyId.LEADER_LENGTH);
if (property == null) {
return null;
}
@@ -1779,15 +1778,4 @@
}
}
- /**
- * Returns the Property for the named property type, if it exists.
- * @param fobj The FoObj to which this property belongs.
- * @param propertyType The integral identifier for the desired property.
- * @return The Property instance, or null if it does not exist.
- */
- private Property getProperty(final FoObj fobj, final FoPropertyId propertyType) {
- final PropertyList propertyList = fobj.getPropertyList();
- return propertyList.getProperty(propertyType);
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 12:14:41
|
Revision: 13630
http://sourceforge.net/p/foray/code/13630
Author: victormote
Date: 2025-05-08 12:14:38 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Improvements to doc, method names, and variable names.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-08 11:30:44 UTC (rev 13629)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-08 12:14:38 UTC (rev 13630)
@@ -163,9 +163,8 @@
}
final int[] attributeSort = sortAttributes(attlist);
final PropertyList propertyList = new PropertyList(attlist.getLength());
- makeList(propertyList, attlist, attributeSort, creator);
+ populateList(propertyList, attlist, attributeSort, creator);
return propertyList;
-
}
/**
@@ -177,7 +176,7 @@
* @return The parsed property.
* @throws PropertyException For errors during parsing.
*/
- public Property parseAttribute(final PropertyList propertyList, final String attributeName,
+ protected Property parseAttribute(final PropertyList propertyList, final String attributeName,
final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final Property property = parseAttributeForNS(propertyList, attributeName, attributeValue, creator);
if (property == null) {
@@ -199,8 +198,8 @@
* @return The parsed property.
* @throws PropertyException For errors during parsing.
*/
- public abstract Property parseAttributeForNS(PropertyList propertyList, String attributeName, String attributeValue,
- FoTreeCreator creator) throws PropertyException;
+ protected abstract Property parseAttributeForNS(PropertyList propertyList, String attributeName,
+ String attributeValue, FoTreeCreator creator) throws PropertyException;
/**
* Parses the attributes for an object in a pre-specified order, building the PropertyList from them.
@@ -211,27 +210,24 @@
* @param creator The FO Tree creation context.
* @throws PropertyException For errors during parsing.
*/
- protected void makeList(final PropertyList propertyList, final Attributes attributes, final int[] attributeSort,
- final FoTreeCreator creator)
- throws PropertyException {
- for (int j = 0; j < attributeSort.length; j++) {
+ protected void populateList(final PropertyList propertyList, final Attributes attributes, final int[] attributeSort,
+ final FoTreeCreator creator) throws PropertyException {
+ for (int sortIndex = 0; sortIndex < attributeSort.length; sortIndex++) {
/* We are reading through the attributes elements in attributeSort
* order. */
- final int i = attributeSort[j];
- final String qualifiedName = attributes.getQName(i);
- final String localName = attributes.getLocalName(i);
- final String attributeValue = attributes.getValue(i);
+ final int attributeIndex = attributeSort[sortIndex];
+ final String qualifiedName = attributes.getQName(attributeIndex);
+ final String localName = attributes.getLocalName(attributeIndex);
+ final String attributeValue = attributes.getValue(attributeIndex);
- /* The namespace on the attribute can be different than the one on
- * the element. So first we need to parse the correct namespace to
- * use. */
+ /* The namespace on the attribute can be different than the one on the element.
+ * So first we need to parse the correct namespace to use. */
if (qualifiedName != null
&& qualifiedName.startsWith("xmlns:")) {
- /* This is a namespace entry. This is processed by the SAX
- * parser & ignored by us. */
+ /* This is a namespace entry. This is processed by the SAX parser & ignored by us. */
continue;
}
- final String namespaceURI = attributes.getURI(i);
+ final String namespaceURI = attributes.getURI(attributeIndex);
NamespaceNative namespace = null;
if (namespaceURI == null
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-05-08 11:30:47
|
Revision: 13629
http://sourceforge.net/p/foray/code/13629
Author: victormote
Date: 2025-05-08 11:30:44 +0000 (Thu, 08 May 2025)
Log Message:
-----------
Give access to the PropertyList as each attribute is parsed, so that compound properties can manage their compoundedness.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-07 16:28:56 UTC (rev 13628)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2025-05-08 11:30:44 UTC (rev 13629)
@@ -170,7 +170,7 @@
/**
* Parses one attribute.
- * @param attributes The unparsed SAX attributes.
+ * @param propertyList The list of properties for which this attribute is being parsed.
* @param attributeName The name of the attribute to be parsed.
* @param attributeValue The value of the attribute to be parsed.
* @param creator The FO Tree creation context.
@@ -177,9 +177,9 @@
* @return The parsed property.
* @throws PropertyException For errors during parsing.
*/
- public Property parseAttribute(final Attributes attributes, final String attributeName, final String attributeValue,
- final FoTreeCreator creator) throws PropertyException {
- final Property property = parseAttributeForNS(attributeName, attributeValue, creator);
+ public Property parseAttribute(final PropertyList propertyList, final String attributeName,
+ final String attributeValue, final FoTreeCreator creator) throws PropertyException {
+ final Property property = parseAttributeForNS(propertyList, attributeName, attributeValue, creator);
if (property == null) {
final String message = String.format("Could not create property \"{}\" with value \"{}\".", attributeName,
attributeValue);
@@ -190,6 +190,9 @@
/**
* Parses one attribute in this namespace.
+ * @param propertyList The list of properties for which this attribute is being parsed.
+ * This is needed so that a compound property can manage the possibility that its components may be specified in
+ * more than one attribute.
* @param attributeName The name of the attribute to be parsed.
* @param attributeValue The value of the attribute to be parsed.
* @param creator The FO Tree creation context.
@@ -196,8 +199,8 @@
* @return The parsed property.
* @throws PropertyException For errors during parsing.
*/
- public abstract Property parseAttributeForNS(String attributeName, String attributeValue, FoTreeCreator creator)
- throws PropertyException;
+ public abstract Property parseAttributeForNS(PropertyList propertyList, String attributeName, String attributeValue,
+ FoTreeCreator creator) throws PropertyException;
/**
* Parses the attributes for an object in a pre-specified order, building the PropertyList from them.
@@ -244,7 +247,7 @@
}
if (namespace instanceof NamespaceNative) {
final NamespaceNative nativeNamespace = (NamespaceNative) namespace;
- final Property property = nativeNamespace.parseAttribute(attributes, localName, attributeValue,
+ final Property property = nativeNamespace.parseAttribute(propertyList, localName, attributeValue,
creator);
if (property != null) {
propertyList.addProperty(property);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java 2025-05-07 16:28:56 UTC (rev 13628)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java 2025-05-08 11:30:44 UTC (rev 13629)
@@ -89,8 +89,8 @@
}
@Override
- public Property parseAttributeForNS(final String attributeName, final String attributeValue,
- final FoTreeCreator creator) throws PropertyException {
+ public Property parseAttributeForNS(final PropertyList propertyList, final String attributeName,
+ final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(attributeName);
final AxslPropertyId enumeration = enumeratePropertyName(basePropertyName);
if (enumeration == null) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-07 16:28:56 UTC (rev 13628)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2025-05-08 11:30:44 UTC (rev 13629)
@@ -778,8 +778,8 @@
}
@Override
- public Property parseAttributeForNS(final String attributeName, final String attributeValue,
- final FoTreeCreator creator) throws PropertyException {
+ public Property parseAttributeForNS(final PropertyList propertyList, final String attributeName,
+ final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(attributeName);
final FoPropertyId enumeration = enumeratePropertyName(basePropertyName);
// final Property property = checkCompoundProperty(fobj, enumeration, attributeName, attributeValue);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java 2025-05-07 16:28:56 UTC (rev 13628)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java 2025-05-08 11:30:44 UTC (rev 13629)
@@ -81,8 +81,8 @@
}
@Override
- public Property parseAttributeForNS(final String attributeName, final String attributeValue,
- final FoTreeCreator creator) throws PropertyException {
+ public Property parseAttributeForNS(final PropertyList propertyList, final String attributeName,
+ final String attributeValue, final FoTreeCreator creator) throws PropertyException {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java 2025-05-07 16:28:56 UTC (rev 13628)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java 2025-05-08 11:30:44 UTC (rev 13629)
@@ -78,8 +78,8 @@
}
@Override
- public Property parseAttributeForNS(final String attributeName, final String attributeValue,
- final FoTreeCreator creator) throws PropertyException {
+ public Property parseAttributeForNS(final PropertyList propertyList, final String attributeName,
+ final String attributeValue, final FoTreeCreator creator) throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(attributeName);
final XmlPropertyId enumeration = enumeratePropertyName(basePropertyName);
if (enumeration == null) {
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-07 16:28:56 UTC (rev 13628)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/PropertyListTests.java 2025-05-08 11:30:44 UTC (rev 13629)
@@ -47,10 +47,11 @@
public void checkCompoundPropertyUpdate() throws PropertyException {
final PropertyList list = new PropertyList(2);
final NamespaceFo ns = NamespaceFo.getInstance();
- final Property prop1 = ns.parseAttributeForNS("space-before.conditionality", "retain",
+ final Property prop1 = ns.parseAttributeForNS(list, "space-before.conditionality", "retain",
AbstractPropertyTests.STD_FO_TREE_CREATOR);
list.addProperty(prop1);
- final Property prop2 = ns.parseAttributeForNS("space-before", "1in", AbstractPropertyTests.STD_FO_TREE_CREATOR);
+ final Property prop2 = ns.parseAttributeForNS(list, "space-before", "1in",
+ AbstractPropertyTests.STD_FO_TREE_CREATOR);
list.addProperty(prop2);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|