[aXSL-commit] SF.net SVN: axsl:[2989] trunk/axsl/axsl-font/src/main /java/org/axsl/font
An API for XSL-FO.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2026-03-08 23:34:37
|
Revision: 2989
http://sourceforge.net/p/axsl/code/2989
Author: victormote
Date: 2026-03-08 23:34:35 +0000 (Sun, 08 Mar 2026)
Log Message:
-----------
Change return type of FontConsumer methods to ConsumerFont. Add method to ConsumerFont to allow the default encoding to be overridden.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2026-03-08 16:37:43 UTC (rev 2988)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2026-03-08 23:34:35 UTC (rev 2989)
@@ -51,6 +51,17 @@
FontConsumer getFontConsumer();
/**
+ * Returns the default encoding to use with this font.
+ * This may or may not be the font's native encoding, allowing implementations to specify some other encoding,
+ * perhaps through configuration.
+ * This does not prevent applications from providing {@FontUse} instances using other encodings, but changes the
+ * default encoding used when no encoding is specified.
+ * @return The default encoding to be used, either the font's internal encoding, or some specified override of that.
+ * @see #getFontUse(Encoding) where any encoding can be used.
+ */
+ Encoding getDefaultEncoding();
+
+ /**
* Returns a {@link FontUse} instance for a given encoding, creating it if necessary.
* @param encoding The encoding for which the {@link FontUse} should be retrieved.
* If this is null, the implication is that the font's internal encoding (if any) should be used.
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2026-03-08 16:37:43 UTC (rev 2988)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2026-03-08 23:34:35 UTC (rev 2989)
@@ -105,7 +105,7 @@
* @see #selectFallbackFont()
* @see <a href="https://www.w3.org/TR/CSS2/fonts.html#algorithm">The CSS2 Font Matching Algorithm</a>
*/
- FontUse selectFont(List<String> familyList, FontStyle style, FontVariant variant, FontWeight weight,
+ ConsumerFont selectFont(List<String> familyList, FontStyle style, FontVariant variant, FontWeight weight,
FontStretch stretch, int fontSize, WritingSystem writingSystem);
/**
@@ -118,7 +118,7 @@
* @see #selectFont(List, FontStyle, FontVariant, FontWeight, FontStretch, int, WritingSystem)
* @see #selectFallbackFont()
*/
- FontUse selectFallbackFont(Script script);
+ ConsumerFont selectFallbackFont(Script script);
/**
* Returns an instance of a fallback font.
@@ -133,7 +133,7 @@
* @see #selectFont(List, FontStyle, FontVariant, FontWeight, FontStretch, int, WritingSystem)
* @see #selectFallbackFont(Script)
*/
- FontUse selectFallbackFont();
+ ConsumerFont selectFallbackFont();
/**
* Returns the {@link ConsumerFont} that wraps the use of a {@link Font}, creating it as needed.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|