axsl-commit Mailing List for aXSL (Page 4)
An API for XSL-FO.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(36) |
Apr
(36) |
May
(127) |
Jun
(193) |
Jul
(12) |
Aug
(46) |
Sep
(66) |
Oct
(28) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(39) |
Feb
(68) |
Mar
(58) |
Apr
(88) |
May
(40) |
Jun
(82) |
Jul
(213) |
Aug
(19) |
Sep
(2) |
Oct
(26) |
Nov
(2) |
Dec
|
2008 |
Jan
(5) |
Feb
(30) |
Mar
(26) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(4) |
Apr
(44) |
May
(1) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
(7) |
May
(35) |
Jun
|
Jul
|
Aug
(48) |
Sep
(10) |
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(40) |
2017 |
Jan
(82) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(37) |
Mar
(28) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(27) |
2021 |
Jan
(52) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
(72) |
Dec
(100) |
2022 |
Jan
(119) |
Feb
(94) |
Mar
(4) |
Apr
|
May
|
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
(10) |
Dec
(97) |
2023 |
Jan
(52) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(21) |
Oct
(8) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(11) |
Feb
(1) |
Mar
|
Apr
(27) |
May
(62) |
Jun
(27) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <vic...@us...> - 2025-05-10 11:29:37
|
Revision: 2808 http://sourceforge.net/p/axsl/code/2808 Author: victormote Date: 2025-05-10 11:29:34 +0000 (Sat, 10 May 2025) Log Message: ----------- Use Script instead of char for selection of font fallback. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 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 2025-05-09 23:49:45 UTC (rev 2807) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-05-10 11:29:34 UTC (rev 2808) @@ -23,6 +23,7 @@ package org.axsl.font; +import org.axsl.i18n.Script; import org.axsl.value.FontSelectionStrategy; import org.axsl.value.FontStretch; import org.axsl.value.FontStyle; @@ -70,7 +71,6 @@ * @return The best-fitting {@link FontUse} instance associated with the descriptive input, or null if none is * found using the given criteria. * @see #selectFontCss(List, Font.Style, Font.Weight, Font.Variant, Font.Stretch, int, int) - * @see #selectFontPanose(Panose, int) * @see #selectFontFallback(int) * @see #selectFontFallback() */ @@ -98,7 +98,6 @@ * character. * @return The best-fitting {@link FontUse} instance associated with the descriptive input. * @see #selectFontXsl(Font.SelectionStrategy, List, Font.Style, Font.Weight, Font.Variant, Font.Stretch, int, int) - * @see #selectFontPanose(Panose, int) * @see #selectFontFallback(int) * @see #selectFontFallback() */ @@ -106,17 +105,17 @@ FontStretch stretch, int codePoint); /** - * Returns an instance of a fallback font that is able to encode a specific Unicode code point. - * This gives applications, which have tried the other font-selection methods without success, the option to obtain - * a font, any font, and continue processing. - * @param codePoint The code point for which a font is needed. - * @return A {@link FontUse} instance that is able to encode {@code codePoint}, or null if none is found. + * Returns an instance of a fallback font that supports a given {@link Script}, without regard to the normal + * selection criteria, such as style and weight. + * This gives applications, which have tried other font-selection methods without success, the option to obtain such + * a font, and continue processing. + * @param script The script for which a font is needed. + * @return A {@link FontUse} instance that generally supports {@code script}, or null if none is found. * @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 #selectFontPanose(Panose, int) * @see #selectFontFallback() */ - FontUse selectFontFallback(int codePoint); + FontUse selectFontFallback(Script script); /** * Returns an instance of a fallback font. @@ -130,7 +129,6 @@ * @return A {@link FontUse} instance, any instance. * @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 #selectFontPanose(Panose, int) * @see #selectFontFallback(int) */ FontUse 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 23:49:48
|
Revision: 2807 http://sourceforge.net/p/axsl/code/2807 Author: victormote Date: 2025-05-09 23:49:45 +0000 (Fri, 09 May 2025) Log Message: ----------- Move Panose interface out of aXSL. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java Removed Paths: ------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Panose.java Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-05-09 22:56:53 UTC (rev 2806) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-05-09 23:49:45 UTC (rev 2807) @@ -576,14 +576,6 @@ int strikeoutPosition(int fontSize); /** - * 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" - */ - Panose getPanose(); - - /** * Returns the font bounding box. * This is the FontBBox value used in a PDF Font Descriptor. * @return The FontBBox value, in 1/1000ths of a text space unit. Deleted: trunk/axsl/axsl-font/src/main/java/org/axsl/font/Panose.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Panose.java 2025-05-09 22:56:53 UTC (rev 2806) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/Panose.java 2025-05-09 23:49:45 UTC (rev 2807) @@ -1,106 +0,0 @@ -/* - * Copyright 2021 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.font; - -/** - * <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); - -} 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:56:57
|
Revision: 2806 http://sourceforge.net/p/axsl/code/2806 Author: victormote Date: 2025-05-09 22:56:53 +0000 (Fri, 09 May 2025) Log Message: ----------- Remove Panose selection method and font size parameter for selecting fonts. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 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 2025-05-09 17:36:57 UTC (rev 2805) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-05-09 22:56:53 UTC (rev 2806) @@ -49,6 +49,7 @@ /** * Accepts the client's description of the desired font, and returns the best-fitting Font found, using the * algorithm specified by the XSL-FO 1.1 Recommendation. + * This method supports only scalable fonts (not bitmapped fonts). * @param selectionStrategy The font-selection strategy to be used. * @param familyList The list of possible font family names from which to choose the font. * The most desirable font-family name is listed first, then the next most desirable, etc. @@ -63,8 +64,6 @@ * Use {@link FontVariant#parseFo(String)} to convert String input. * @param stretch The stretch of the font desired. * Use {@link FontStretch#parseFo(String)} to convert String input. - * @param size The size (in millipoints) of the font. - * This is only meaningful for bitmapped fonts. * @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. @@ -76,12 +75,13 @@ * @see #selectFontFallback() */ FontUse selectFontXsl(FontSelectionStrategy selectionStrategy, List<String> familyList, FontStyle style, - FontWeight weight, FontVariant variant, FontStretch stretch, int size, int codePoint); + FontWeight weight, FontVariant variant, FontStretch stretch, int codePoint); /** * The same as {@link #selectFontXsl}, except that the algorithm specified by CSS 2.1 is used instead. * Note that CSS has no concept of specifying a font-selection-strategy as XSL-FO does. * The implied font-selection-strategy for CSS is {@link FontSelectionStrategy#CHARACTER_BY_CHARACTER}. + * This method supports only scalable fonts (not bitmapped fonts). * @param familyList See {@link #selectFontXsl}. * Client applications may use {@link FontUtility#cssFontFamily(CharSequence)} to convert String input into the * value expected here. @@ -93,8 +93,6 @@ * Use {@link FontVariant#parseFo(String)} to convert String input. * @param stretch See {@link #selectFontXsl}. * Use {@link FontStretch#parseFo(String)} to convert String input. - * @param size The size (in millipoints) of the font. - * This is only meaningful for bitmapped fonts. * @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. @@ -105,25 +103,9 @@ * @see #selectFontFallback() */ FontUse selectFontCss(List<String> familyList, FontStyle style, FontWeight weight, FontVariant variant, - FontStretch stretch, int size, int codePoint); + FontStretch stretch, int codePoint); /** - * 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() - */ - FontUse selectFontPanose(Panose panose, int codePoint); - - /** * Returns an instance of a fallback font that is able to encode a specific Unicode code point. * This gives applications, which have tried the other font-selection methods without success, the option to obtain * a font, any font, and continue processing. 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:37:02
|
Revision: 2805 http://sourceforge.net/p/axsl/code/2805 Author: victormote Date: 2025-05-09 17:36:57 +0000 (Fri, 09 May 2025) Log Message: ----------- Clean up some documentation. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java 2025-05-09 17:04:25 UTC (rev 2804) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java 2025-05-09 17:36:57 UTC (rev 2805) @@ -28,13 +28,11 @@ import java.util.List; /** - * <p>Class containing font-related utility methods.</p> - * <p>References to CSS2 are to the Cascading Style Sheet standard, version 2.0, - * found at:</p> - * <p>{@code http://www.w3.org/TR/REC-CSS2/}</p> - * <p>References to XSL-FO refer to the eXtensible Stylesheet Language - * Formatting Objects standard, version 1.0, found at:</p> - * <p>{@code http://www.w3.org/TR/2001/REC-xsl-20011015/}</p> + * <p>Font-related utility helper methods useful to applications that interface with axsl-font.</p> + * + * @see <a href="http://www.w3.org/TR/REC-CSS2/">The Cascading Style Sheet standard, version 2.0,</a> + * @see <a href="http://www.w3.org/TR/2001/REC-xsl-20011015/">The eXtensible Stylesheet Language Formatting Objects + * standard, version 1.0</a> */ public final class FontUtility { @@ -45,33 +43,30 @@ private static final String TWO_SPACES = " "; /** - * Private Constructor. This class should never be instantiated. + * Private Constructor. This is a utility class and should never be instantiated. */ - private FontUtility() { - } + private FontUtility() { } /** - * Converts a CSS2-style String input for font-family into a value expected - * by {@link FontConsumer#selectFontCss(List, Font.Style, Font.Weight, - * Font.Variant, Font.Stretch, int, int)}. + * Converts a CSS2-style String input for font-family into a value expected by + * {@link FontConsumer#selectFontCss(List, org.axsl.value.FontStyle, org.axsl.value.FontWeight, + * org.axsl.value.FontVariant, org.axsl.value.FontStretch, int, int)}. * @param input The CSS2-style font-family String to be converted. - * This is a comma-delimited String containing one or more potential - * font-family items to be selected. Consult the CSS2 standard for - * details. + * This is a comma-delimited String containing one or more potential font-family items to be selected. + * Consult the CSS2 standard for details. * @return A String array with the parsed font-family items in it. - * This method never returns "null", but may return an array with zero - * elements for invalid input. - * @see FontConsumer#selectFontCss(List, Font.Style, Font.Weight, - * Font.Variant, Font.Stretch, int, int) + * This method never returns "null", but may return an array with zero elements for invalid input. + * @see FontConsumer#selectFontCss(List, org.axsl.value.FontStyle, org.axsl.value.FontWeight, + * org.axsl.value.FontVariant, org.axsl.value.FontStretch, int, int) + * @see #foFontFamily(CharSequence) */ public static List<String> cssFontFamily(final CharSequence input) { /* There may be a better way to do this ... - * Our main delimiter is comma, but a comma would be allowed inside - * a quoted string. So I see no way to use StringTokenizer. - * There is probably a way to do this with Pattern, but it seems even - * klunkier than the char-by-char approach below. - * This method may get used frequently, so performance is somewhat - * important here. */ + * Our main delimiter is comma, but a comma would be allowed inside a quoted string. + * So I see no way to use StringTokenizer. + * There is probably a way to do this with Pattern, but it seems even klunkier than the char-by-char approach + * below. + * This method may get used frequently, so performance is somewhat important here. */ if (input == null) { return Collections.emptyList(); } @@ -171,8 +166,7 @@ } /** - * Count the number of font-family elements in the given input, and do some - * basic validation. + * Count the number of font-family elements in the given input, and do some basic validation. * @param chars The font-family specifier. * @return The number of font-family elements in the input. */ @@ -221,8 +215,7 @@ /** * Parses the pre-counted font-family elements from the input. * @param chars The font-family specifier. - * @param elementCount The pre-count of the number of elements in the - * output. + * @param elementCount The pre-count of the number of elements in the output. * @return The parsed font-family elements. */ private static List<String> parseFontFamilyElements(final CharSequence chars, @@ -236,8 +229,8 @@ for (int i = 0; i < chars.length(); i++) { final char currentChar = chars.charAt(i); switch (currentChar) { - /* We have already tested for single quotes nested in double, and - * vice versa, so just treat them as being equivalent here. */ + /* We have already tested for single quotes nested in double, and vice versa, so just treat them as being + * equivalent here. */ case '\"': case '\'': { insideQuotes = ! insideQuotes; @@ -283,15 +276,12 @@ } /** - * Same as {@link #cssFontFamily(CharSequence)}, except input is an - * XSL-FO-style String. + * Same as {@link #cssFontFamily(CharSequence)}, except input is an XSL-FO-style String. * @param input The XSL-FO font-family String to be converted. - * This is a comma-delimited String containing one or more potential - * font-family items to be selected. Consult the XSL-FO standard for - * details. + * This is a comma-delimited String containing one or more potential font-family items to be selected. + * Consult the XSL-FO Recommendation for details. * @return A String array with the parsed font-family items in it. - * This method never returns "null", but may return an array with zero - * elements for invalid input. + * This method never returns "null", but may return an array with zero elements for invalid input. * @see #cssFontFamily(CharSequence) */ public static List<String> foFontFamily(final CharSequence input) { 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:04:30
|
Revision: 2804 http://sourceforge.net/p/axsl/code/2804 Author: victormote Date: 2025-05-09 17:04:25 +0000 (Fri, 09 May 2025) Log Message: ----------- Remove more unneeded methods. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java 2025-05-09 16:51:02 UTC (rev 2803) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java 2025-05-09 17:04:25 UTC (rev 2804) @@ -24,51 +24,12 @@ package org.axsl.font; /** - * <p>FontServer provides some basic system-wide services such as listing - * available fonts.</p> - * - * <p>Notes to creating implementations of FontServer:</p> - * <ul> - * <li>FontServer is designed to be a singleton, but is not required to be - * so.</li> - * <li>The FontConsumer interface allows FontServer to keep track of the - * varous clients that are using its services. - * Since multiple documents and even multiple applications may be using - * FontServer services, most services are provided directly by the FontConsumer - * so that they can be kept separate. - * Therefore, it should be possible to create implementations that are - * thread-safe.</li> - * </ul> - * + * <p>FontServer is a factory for {@link FontConsumer} instances, which in turn provide font services to other + * applications.</p> */ public interface FontServer { /** - * 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. - */ - boolean isRegisteredFontFamily(String name); - - /** - * 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}. - */ - String getFontFamilyForAlias(String alias); - - /** - * 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. - */ - boolean isRegisteredFont(String fontID); - - /** * Creates an implementation-specific {@link FontConsumer} instance. * @param constraints The constraints to be used by the {@link FontConsumer} during font selection. * This can be null, and, if so, there are no constraints on what the {@link FontConsumer} is allowed to return. 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:05
|
Revision: 2803 http://sourceforge.net/p/axsl/code/2803 Author: victormote Date: 2025-05-09 16:51:02 +0000 (Fri, 09 May 2025) Log Message: ----------- Remove more unneeded methods. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java 2025-05-09 16:31:26 UTC (rev 2802) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java 2025-05-09 16:51:02 UTC (rev 2803) @@ -23,14 +23,6 @@ package org.axsl.font; -import org.axsl.ps.Encoding; -import org.axsl.value.FontStretch; -import org.axsl.value.FontStyle; -import org.axsl.value.FontVariant; -import org.axsl.value.FontWeight; - -import java.net.URL; - /** * <p>FontServer provides some basic system-wide services such as listing * available fonts.</p> @@ -52,13 +44,6 @@ public interface FontServer { /** - * 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. - */ - void registerFontFamily(String name) throws FontException; - - /** * 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"). @@ -67,17 +52,6 @@ boolean isRegisteredFontFamily(String name); /** - * Add a font-family alias. - * @param alias The name of the font-family alias (e.g. "sans-serif"). - * @param realFamily The name of the real font-family to which this alias - * should be associated (e.g. "Helvetica"). - * @throws FontException If the font-family alias is already registered, or - * if {@code realFamily} is not a registered font-family. - */ - void registerFontFamilyAlias(String alias, String realFamily) - throws FontException; - - /** * 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 @@ -86,21 +60,6 @@ String getFontFamilyForAlias(String alias); /** - * 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. - */ - void registerFont(String fontID, URL fontFileSource, URL metricsFileSource, String collectionID, - Font.Embedding requestedEmbedding, String systemName) throws FontException; - - /** * 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"). @@ -110,24 +69,6 @@ boolean isRegisteredFont(String fontID); /** - * 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. - */ - void registerFontDescription(String fontFamily, String fontID, Encoding encoding, FontStyle style, - FontWeight weight, FontVariant variant, FontStretch stretch, FontFeatureSimulation simulation) - throws FontException; - - /** * Creates an implementation-specific {@link FontConsumer} instance. * @param constraints The constraints to be used by the {@link FontConsumer} during font selection. * This can be null, and, if so, there are no constraints on what the {@link FontConsumer} is allowed to return. 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:31:29
|
Revision: 2802 http://sourceforge.net/p/axsl/code/2802 Author: victormote Date: 2025-05-09 16:31:26 +0000 (Fri, 09 May 2025) Log Message: ----------- Remove unnecessary methods from FontServer. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java 2025-05-09 11:05:40 UTC (rev 2801) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontServer.java 2025-05-09 16:31:26 UTC (rev 2802) @@ -30,7 +30,6 @@ import org.axsl.value.FontWeight; import java.net.URL; -import java.util.List; /** * <p>FontServer provides some basic system-wide services such as listing @@ -53,40 +52,6 @@ public interface FontServer { /** - * 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. - */ - List<? extends Font> getAllFonts(boolean freeStandingFonts, boolean systemFonts); - - /** - * 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). - */ - List<String> getSystemFontFamilyList(); - - /** - * 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). - */ - List<java.awt.Font> getSystemFontList(); - - /** * 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. 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:05:43
|
Revision: 2801 http://sourceforge.net/p/axsl/code/2801 Author: victormote Date: 2025-05-09 11:05:40 +0000 (Fri, 09 May 2025) Log Message: ----------- Reverse previous change that added FoContext method to support the "auto" value of the "script" property. We think this can be handled totally within the FoTree side. Modified Paths: -------------- trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java Modified: trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java =================================================================== --- trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java 2025-05-08 22:03:54 UTC (rev 2800) +++ trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java 2025-05-09 11:05:40 UTC (rev 2801) @@ -28,7 +28,6 @@ import org.axsl.fotree.fo.Marker; import org.axsl.fotree.fo.RetrieveMarker; import org.axsl.fotree.fo.RetrieveTableMarker; -import org.axsl.i18n.Script; import org.axsl.value.BaselineIdentifier; import org.axsl.value.group.TextModifiers; @@ -154,24 +153,10 @@ float normalLineHeightFactor(); /** - * Returns some information about the Font to be used in font-related calculations, such as x-height, subscript- and - * superscript-shift, text-depth, etc. + * Returns some information about the selected font, to be used in font-related calculations, such as x-height, + * subscript-shift, superscript-shift, text-depth, etc. * @return The font data. */ FontData getFontData(); - /** - * <p>Returns the resolved {@link Script} instance that should be used for objects having a "script" property whose - * value is "auto". - * For fo:character objects, this is the script of the "character" property. - * For all other objects, this is the script of the first (pre-order traversal) character descendant whose script - * identifier is unambiguous.</p> - * - * <p>Design note: It was decided that having the context resolve the script was more convenient and efficient than - * having chunks of text computed and passed back to the FoTree.</p> - * @return The resolved script value - * @see "XSL-FO Recommendation 1.1, Section 7.10.3." - */ - Script 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:03:56
|
Revision: 2800 http://sourceforge.net/p/axsl/code/2800 Author: victormote Date: 2025-05-08 22:03:54 +0000 (Thu, 08 May 2025) Log Message: ----------- Add FoContext method to support the "auto" value of the "script" property. Modified Paths: -------------- trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java Modified: trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java =================================================================== --- trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java 2025-05-07 13:12:49 UTC (rev 2799) +++ trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java 2025-05-08 22:03:54 UTC (rev 2800) @@ -28,6 +28,7 @@ import org.axsl.fotree.fo.Marker; import org.axsl.fotree.fo.RetrieveMarker; import org.axsl.fotree.fo.RetrieveTableMarker; +import org.axsl.i18n.Script; import org.axsl.value.BaselineIdentifier; import org.axsl.value.group.TextModifiers; @@ -159,4 +160,18 @@ */ FontData getFontData(); + /** + * <p>Returns the resolved {@link Script} instance that should be used for objects having a "script" property whose + * value is "auto". + * For fo:character objects, this is the script of the "character" property. + * For all other objects, this is the script of the first (pre-order traversal) character descendant whose script + * identifier is unambiguous.</p> + * + * <p>Design note: It was decided that having the context resolve the script was more convenient and efficient than + * having chunks of text computed and passed back to the FoTree.</p> + * @return The resolved script value + * @see "XSL-FO Recommendation 1.1, Section 7.10.3." + */ + Script autoScript(); + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-05-07 13:13:12
|
Revision: 2799 http://sourceforge.net/p/axsl/code/2799 Author: victormote Date: 2025-05-07 13:12:49 +0000 (Wed, 07 May 2025) Log Message: ----------- Fix some recently revealed Checkstyle complaints. Modified Paths: -------------- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontContext.java trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontFeatureSimulation.java trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBox.java trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBranch.java trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpPenalty.java Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-05-04 21:14:42 UTC (rev 2798) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-05-07 13:12:49 UTC (rev 2799) @@ -233,7 +233,7 @@ * For a 12-point font, this value should be 12,000. * @return The computed millipoint value of {@code glyphSpaceUnits} scaled to {@code fontSize}. */ - default int toMillipoints(int glyphSpaceUnits, int fontSize) { + default int toMillipoints(final int glyphSpaceUnits, final int fontSize) { return TypographicConstants.glyphSpaceUnitsToMillipoints(glyphSpaceUnits, getUnitsPerEm(), fontSize); } @@ -247,7 +247,7 @@ * In all other cases, returns the width of the undefined glyph. * To ensure that a glyph is actually available in the font, check the return value of {@link #metricIndex(int)}. */ - default int width(int codePoint, int fontSize) { + default int width(final int codePoint, final int fontSize) { final int nativeWidth = this.getNativeWidth(codePoint); return toMillipoints(nativeWidth, fontSize); } @@ -274,8 +274,9 @@ * If there is no glyph for a character in {@code chars}, the width returned will be either a computed estimate (for * characters like em-space and en-space) or that of the "missing glyph". */ - default int width(final CharSequence chars, int offset, int length, int fontSize, int letterSpacing, - int wordSpacing, FontContext requestedFontContext, Orthography orthography) { + default int width(final CharSequence chars, final int offset, final int length, final int fontSize, + final int letterSpacing, final int wordSpacing, final FontContext requestedFontContext, + final Orthography orthography) { final FontContext fontContext = requestedFontContext == null ? FontContext.DEFAULT : requestedFontContext; /* Glyph widths and kerning are accumulated in glyph space units (not millipoints). */ int glyphSpaceSize = 0; @@ -324,7 +325,8 @@ * @return The width, in millipoints, of {@code chars}. * If there is no glyph for a character in {@code chars}, the width returned will be that of the "missing glyph". */ - default int width(CharSequence chars, int fontSize, FontContext fontContext, Orthography orthography) { + default int width(final CharSequence chars, final int fontSize, final FontContext fontContext, + final Orthography orthography) { return width(chars, 0, chars.length(), fontSize, 0, 0, fontContext, orthography); } Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontContext.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontContext.java 2025-05-04 21:14:42 UTC (rev 2798) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontContext.java 2025-05-07 13:12:49 UTC (rev 2799) @@ -54,7 +54,7 @@ * feature tags, it is safer to make this a String). * @return True if and only if {@code feature} is active. */ - default boolean isFeatureActive(String feature) { + default boolean isFeatureActive(final String feature) { return true; } Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontFeatureSimulation.java =================================================================== --- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontFeatureSimulation.java 2025-05-04 21:14:42 UTC (rev 2798) +++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontFeatureSimulation.java 2025-05-07 13:12:49 UTC (rev 2799) @@ -82,7 +82,7 @@ * @return Returns the percentage by which the font should be stretched horizontally to simulat {@code fontStretch}, * or null if it should not simulate font-stretch. */ - default BigDecimal getSimulatedStretch(FontStretch fontStretch) { + default BigDecimal getSimulatedStretch(final FontStretch fontStretch) { return null; } Modified: trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBox.java =================================================================== --- trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBox.java 2025-05-04 21:14:42 UTC (rev 2798) +++ trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBox.java 2025-05-07 13:12:49 UTC (rev 2799) @@ -41,7 +41,7 @@ * The Knuth-Plass documentation does not specifically consider that a {@link KpBox} might be stretchable. */ @Override - default int getStretchability(KpContext config) { + default int getStretchability(final KpContext config) { return 0; } @@ -50,7 +50,7 @@ * The Knuth-Plass documentation does not specifically consider that a {@link KpBox} might be shrinkable. */ @Override - default int getShrinkability(KpContext config) { + default int getShrinkability(final KpContext config) { return 0; } Modified: trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBranch.java =================================================================== --- trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBranch.java 2025-05-04 21:14:42 UTC (rev 2798) +++ trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpBranch.java 2025-05-07 13:12:49 UTC (rev 2799) @@ -92,7 +92,7 @@ * @param leafIndex The index into the descendant leaf nodes. * @return The leaf node at {@code leafIndex}. */ - default KpLeaf kpLeafAt(int leafIndex) { + default KpLeaf kpLeafAt(final int leafIndex) { int runningLeafIndex = 0; for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) { final KpNode node = kpNodeAt(nodeIndex); Modified: trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpPenalty.java =================================================================== --- trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpPenalty.java 2025-05-04 21:14:42 UTC (rev 2798) +++ trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpPenalty.java 2025-05-07 13:12:49 UTC (rev 2799) @@ -144,7 +144,7 @@ * actually used. */ @Override - default int getIdealWidth(KpContext config) { + default int getIdealWidth(final KpContext config) { return 0; } @@ -153,7 +153,7 @@ * {@link KpPenalty} should always return zero here. */ @Override - default int getStretchability(KpContext config) { + default int getStretchability(final KpContext config) { return 0; } @@ -162,7 +162,7 @@ * {@link KpPenalty} should always return zero here. */ @Override - default int getShrinkability(KpContext config) { + default int getShrinkability(final KpContext config) { return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-05-04 21:14:59
|
Revision: 2798 http://sourceforge.net/p/axsl/code/2798 Author: victormote Date: 2025-05-04 21:14:42 +0000 (Sun, 04 May 2025) Log Message: ----------- Add marker interface for bitmap graphics. Added Paths: ----------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/BitmapGraphic.java Added: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/BitmapGraphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/BitmapGraphic.java (rev 0) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/BitmapGraphic.java 2025-05-04 21:14:42 UTC (rev 2798) @@ -0,0 +1,35 @@ +/* + * Copyright 2025 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.graphic; + +/** + * A graphic that is composed of an array of pixels. + */ +public interface BitmapGraphic extends Graphic { + + /* This interface is just a marker at the moment. There are several methods in Graphic that need to be moved to + * this subinterface after the infrastructure is in place to better handle EPS, which is part vector and part + * bitmap. */ + +} Property changes on: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/BitmapGraphic.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-05-04 13:38:19
|
Revision: 2797 http://sourceforge.net/p/axsl/code/2797 Author: victormote Date: 2025-05-04 13:38:00 +0000 (Sun, 04 May 2025) Log Message: ----------- Rename interfaces for output of vector graphics, for clarity. Modified Paths: -------------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java Added Paths: ----------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Java2d.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Pdf.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Ps.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutputContext.java Removed Paths: ------------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicJava2d.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutput.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutputContext.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPdf.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPs.java Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java 2025-05-04 12:57:11 UTC (rev 2796) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -23,10 +23,10 @@ package org.axsl.graphic; -import org.axsl.graphic.output.GraphicJava2d; -import org.axsl.graphic.output.GraphicOutput; -import org.axsl.graphic.output.GraphicPdf; -import org.axsl.graphic.output.GraphicPs; +import org.axsl.graphic.output.VectorOutput; +import org.axsl.graphic.output.VectorOutput2Java2d; +import org.axsl.graphic.output.VectorOutput2Pdf; +import org.axsl.graphic.output.VectorOutput2Ps; /** * A graphic that is drawn or painted. @@ -34,7 +34,7 @@ public interface VectorGraphic extends Graphic { /** - * Provide a {@link GraphicOutput} implementation for a given mime type. + * Provide a {@link VectorOutput} implementation for a given mime type. * This is only useful for vector graphics. * Other graphics should return null. * The purpose of this general design pattern is to allow implementations to support arbitrary output types. @@ -41,13 +41,13 @@ * However, interfaces for some output types are included in aXSL, and implementations should return instances of * these types for the corresponding mime-type: * <ul> - * <li>Pseudo-mime "java/java2d" should return an instance of {@link GraphicJava2d}.</li> - * <li>Mime "application/pdf" should return an instance of {@link GraphicPdf}.</li> - * <li>Mime "application/postscript" should return an instance of {@link GraphicPs}.</li> + * <li>Pseudo-mime "java/java2d" should return an instance of {@link VectorOutput2Java2d}.</li> + * <li>Mime "application/pdf" should return an instance of {@link VectorOutput2Pdf}.</li> + * <li>Mime "application/postscript" should return an instance of {@link VectorOutput2Ps}.</li> * </ul> * @param mimeType The mime type for which the GraphicOutput instance should be obtained. * @return A GraphicOutput implementation for the requested mime type. */ - GraphicOutput getGraphicOutput(String mimeType); + VectorOutput getVectorOutput(String mimeType); } Deleted: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicJava2d.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicJava2d.java 2025-05-04 12:57:11 UTC (rev 2796) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicJava2d.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -1,50 +0,0 @@ -/* - * Copyright 2007 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.graphic.output; - -import org.axsl.graphic.GraphicException; - -import java.awt.Graphics2D; -import java.awt.geom.Rectangle2D; - - -/** - * Provides services to applications using graphics with Java2D output. - */ -public interface GraphicJava2d extends GraphicOutput { - - /** - * Draws the graphic in a Graphics2D instance. - * @param graphics The Graphics instance into which the painting should - * be done. - * @param contentRectangle The rectangle into which the graphic should be - * drawn. This rectangle's coordinates must be expressed in Java2D user - * space, whose point of origin (0,0) is in the upper left corner of the - * page. - * @throws GraphicException For errors rendering the graphic. - */ - void drawGraphic(Graphics2D graphics, Rectangle2D.Float contentRectangle) - throws GraphicException; - -} Deleted: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutput.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutput.java 2025-05-04 12:57:11 UTC (rev 2796) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutput.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -1,40 +0,0 @@ -/* - * Copyright 2007 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.graphic.output; - -import org.axsl.graphic.Graphic; - -/** - * Superinterface for all aXSL Graphic Output interfaces. - */ -public interface GraphicOutput { - - /** - * Return the parent {@link Graphic} instance. - * @return The {@link Graphic} instance used to create this GraphicOutput - * implementation. - */ - Graphic getGraphic(); - -} Deleted: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutputContext.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutputContext.java 2025-05-04 12:57:11 UTC (rev 2796) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutputContext.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -1,60 +0,0 @@ -/* - * Copyright 2007 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.graphic.output; - -import org.axsl.font.FontUse; - -import java.awt.MultipleGradientPaint; - -/** - * Provides contextual information to a GraphicOutput implementation. - */ -public interface GraphicOutputContext { - - /** - * For a given FontUse instance, returns the name by which the font is - * referred within the output document. - * This is useful only in vector-based graphic formats, like SVG, where text - * can be written using fonts. - * For example, a PostScript or PDF document may name a given font something - * like "Fx", where "x" is a sequentially assigned number, perhaps "F2". - * Although the Graphic system has a handle to the FontUse instance itself, - * it has no way of knowing by what name it should refer to that font when - * using it to write text. - * @param fontUse The FontUse instance for which a name is needed. - * @return The font name to be used when writing content to the output - * document. - */ - String getFontName(FontUse fontUse); - - /** - * For a given Gradient instance, returns the name by which the gradient is referred within the output document. - * The graphic system has no way of knowing what internal name a PostScript or PDF document has assigned to a given - * gradient, so this method is used to find out. - * @param gradient The Gradient instance for which a name is needed. - * @return The name to be used to describe {@code gradient} when writing content to the output document. - */ - String getGradientName(MultipleGradientPaint gradient); - -} Deleted: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPdf.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPdf.java 2025-05-04 12:57:11 UTC (rev 2796) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPdf.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -1,48 +0,0 @@ -/* - * Copyright 2007 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.graphic.output; - -import org.axsl.font.FontConsumer; -import org.axsl.graphic.GraphicException; -import org.axsl.orthography.Orthography; - -import java.awt.Graphics2D; - -/** - * Provides services to applications using and embedding graphics in PDF output. - */ -public interface GraphicPdf extends GraphicOutput { - - /** - * Writes the graphic content to a {@link Graphics2D} instance, which knows how to write it into a PDF. - * @param graphic2d The AWT {@link Graphics2D} instance into which this graphic should be written. - * @param fontConsumer The FontConsumer used for resolving and tracking fonts. - * If null, the renderer should stroke the glyphs instead of using fonts. - * @param orthography The orthography. - * @throws GraphicException For errors writing the PDF document. - */ - void drawVectorContent(Graphics2D graphic2d, FontConsumer fontConsumer, Orthography orthography) - throws GraphicException; - -} Deleted: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPs.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPs.java 2025-05-04 12:57:11 UTC (rev 2796) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPs.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -1,56 +0,0 @@ -/* - * Copyright 2007 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.graphic.output; - -import org.axsl.font.FontConsumer; -import org.axsl.graphic.GraphicException; - -import java.io.OutputStream; - -/** - * Provides services to applications using and embedding graphics in PostScript - * output. - */ -public interface GraphicPs extends GraphicOutput { - - /** - * Places the graphic content into an output stream in PostScript format. - * @param output The output stream into which the graphic should be written. - * @param outputContext The output context in which this content is being - * written. - * @param fontConsumer The FontConsumer used for resolving and tracking - * fonts. - * @param strokeText Indicates whether text should be converted to strokes - * (true) or whether it should be drawn with fonts (false). In most cases - * it is highly recommended that this value be set to <em>false</em>. - * @param commentsEnabled Indicates whether comments should be written to - * the output. - * @throws GraphicException For errors writing the PostScript document. - */ - void drawVectorContent(OutputStream output, - GraphicOutputContext outputContext, FontConsumer fontConsumer, - boolean strokeText, boolean commentsEnabled) - throws GraphicException; - -} Copied: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput.java (from rev 2783, trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutput.java) =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput.java (rev 0) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -0,0 +1,40 @@ +/* + * Copyright 2007 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.graphic.output; + +import org.axsl.graphic.Graphic; + +/** + * Superinterface for all aXSL Graphic Output interfaces. + */ +public interface VectorOutput { + + /** + * Return the parent {@link Graphic} instance. + * @return The {@link Graphic} instance used to create this GraphicOutput + * implementation. + */ + Graphic getGraphic(); + +} Copied: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Java2d.java (from rev 2783, trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicJava2d.java) =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Java2d.java (rev 0) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Java2d.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -0,0 +1,50 @@ +/* + * Copyright 2007 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.graphic.output; + +import org.axsl.graphic.GraphicException; + +import java.awt.Graphics2D; +import java.awt.geom.Rectangle2D; + + +/** + * Provides services to applications using graphics with Java2D output. + */ +public interface VectorOutput2Java2d extends VectorOutput { + + /** + * Draws the graphic in a Graphics2D instance. + * @param graphics The Graphics instance into which the painting should + * be done. + * @param contentRectangle The rectangle into which the graphic should be + * drawn. This rectangle's coordinates must be expressed in Java2D user + * space, whose point of origin (0,0) is in the upper left corner of the + * page. + * @throws GraphicException For errors rendering the graphic. + */ + void drawGraphic(Graphics2D graphics, Rectangle2D.Float contentRectangle) + throws GraphicException; + +} Copied: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Pdf.java (from rev 2783, trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPdf.java) =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Pdf.java (rev 0) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Pdf.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -0,0 +1,48 @@ +/* + * Copyright 2007 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.graphic.output; + +import org.axsl.font.FontConsumer; +import org.axsl.graphic.GraphicException; +import org.axsl.orthography.Orthography; + +import java.awt.Graphics2D; + +/** + * Provides services to applications using and embedding graphics in PDF output. + */ +public interface VectorOutput2Pdf extends VectorOutput { + + /** + * Writes the graphic content to a {@link Graphics2D} instance, which knows how to write it into a PDF. + * @param graphic2d The AWT {@link Graphics2D} instance into which this graphic should be written. + * @param fontConsumer The FontConsumer used for resolving and tracking fonts. + * If null, the renderer should stroke the glyphs instead of using fonts. + * @param orthography The orthography. + * @throws GraphicException For errors writing the PDF document. + */ + void drawVectorContent(Graphics2D graphic2d, FontConsumer fontConsumer, Orthography orthography) + throws GraphicException; + +} Copied: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Ps.java (from rev 2783, trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicPs.java) =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Ps.java (rev 0) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutput2Ps.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -0,0 +1,56 @@ +/* + * Copyright 2007 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.graphic.output; + +import org.axsl.font.FontConsumer; +import org.axsl.graphic.GraphicException; + +import java.io.OutputStream; + +/** + * Provides services to applications using and embedding graphics in PostScript + * output. + */ +public interface VectorOutput2Ps extends VectorOutput { + + /** + * Places the graphic content into an output stream in PostScript format. + * @param output The output stream into which the graphic should be written. + * @param outputContext The output context in which this content is being + * written. + * @param fontConsumer The FontConsumer used for resolving and tracking + * fonts. + * @param strokeText Indicates whether text should be converted to strokes + * (true) or whether it should be drawn with fonts (false). In most cases + * it is highly recommended that this value be set to <em>false</em>. + * @param commentsEnabled Indicates whether comments should be written to + * the output. + * @throws GraphicException For errors writing the PostScript document. + */ + void drawVectorContent(OutputStream output, + VectorOutputContext outputContext, FontConsumer fontConsumer, + boolean strokeText, boolean commentsEnabled) + throws GraphicException; + +} Copied: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutputContext.java (from rev 2783, trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/GraphicOutputContext.java) =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutputContext.java (rev 0) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/output/VectorOutputContext.java 2025-05-04 13:38:00 UTC (rev 2797) @@ -0,0 +1,60 @@ +/* + * Copyright 2007 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.graphic.output; + +import org.axsl.font.FontUse; + +import java.awt.MultipleGradientPaint; + +/** + * Provides contextual information to a GraphicOutput implementation. + */ +public interface VectorOutputContext { + + /** + * For a given FontUse instance, returns the name by which the font is + * referred within the output document. + * This is useful only in vector-based graphic formats, like SVG, where text + * can be written using fonts. + * For example, a PostScript or PDF document may name a given font something + * like "Fx", where "x" is a sequentially assigned number, perhaps "F2". + * Although the Graphic system has a handle to the FontUse instance itself, + * it has no way of knowing by what name it should refer to that font when + * using it to write text. + * @param fontUse The FontUse instance for which a name is needed. + * @return The font name to be used when writing content to the output + * document. + */ + String getFontName(FontUse fontUse); + + /** + * For a given Gradient instance, returns the name by which the gradient is referred within the output document. + * The graphic system has no way of knowing what internal name a PostScript or PDF document has assigned to a given + * gradient, so this method is used to find out. + * @param gradient The Gradient instance for which a name is needed. + * @return The name to be used to describe {@code gradient} when writing content to the output document. + */ + String getGradientName(MultipleGradientPaint gradient); + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-05-04 12:57:28
|
Revision: 2796 http://sourceforge.net/p/axsl/code/2796 Author: victormote Date: 2025-05-04 12:57:11 +0000 (Sun, 04 May 2025) Log Message: ----------- Create VectorGraphic interface, and move vector-specific method to it. Modified Paths: -------------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/EpsGraphic.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/MathGraphic.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/SvgGraphic.java Added Paths: ----------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/EpsGraphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/EpsGraphic.java 2025-05-04 11:59:31 UTC (rev 2795) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/EpsGraphic.java 2025-05-04 12:57:11 UTC (rev 2796) @@ -28,7 +28,7 @@ /** * Interface for EPS Graphic objects. */ -public interface EpsGraphic extends Graphic { +public interface EpsGraphic extends VectorGraphic { /** * Returns the EPS Bounding Box. This array of four numerics contains a Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-05-04 11:59:31 UTC (rev 2795) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-05-04 12:57:11 UTC (rev 2796) @@ -23,10 +23,6 @@ package org.axsl.graphic; -import org.axsl.graphic.output.GraphicJava2d; -import org.axsl.graphic.output.GraphicOutput; -import org.axsl.graphic.output.GraphicPdf; -import org.axsl.graphic.output.GraphicPs; import org.axsl.primitive.sequence.ByteSequence; import java.awt.Color; @@ -254,21 +250,4 @@ */ List<? extends GraphicLink> getLinks(); - /** - * Provide a {@link GraphicOutput} implementation for a given mime type. - * This is only useful for vector graphics. - * Other graphics should return null. - * The purpose of this general design pattern is to allow implementations to support arbitrary output types. - * However, interfaces for some output types are included in aXSL, and implementations should return instances of - * these types for the corresponding mime-type: - * <ul> - * <li>Pseudo-mime "java/java2d" should return an instance of {@link GraphicJava2d}.</li> - * <li>Mime "application/pdf" should return an instance of {@link GraphicPdf}.</li> - * <li>Mime "application/postscript" should return an instance of {@link GraphicPs}.</li> - * </ul> - * @param mimeType The mime type for which the GraphicOutput instance should be obtained. - * @return A GraphicOutput implementation for the requested mime type. - */ - GraphicOutput getGraphicOutput(String mimeType); - } Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/MathGraphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/MathGraphic.java 2025-05-04 11:59:31 UTC (rev 2795) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/MathGraphic.java 2025-05-04 12:57:11 UTC (rev 2796) @@ -28,7 +28,7 @@ /** * Interface for MathML Graphic objects. */ -public interface MathGraphic extends Graphic { +public interface MathGraphic extends VectorGraphic { /** * Return the encapsulated MathMLDocument. Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/SvgGraphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/SvgGraphic.java 2025-05-04 11:59:31 UTC (rev 2795) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/SvgGraphic.java 2025-05-04 12:57:11 UTC (rev 2796) @@ -28,7 +28,7 @@ /** * Interface for SVG Graphic objects. */ -public interface SvgGraphic extends Graphic { +public interface SvgGraphic extends VectorGraphic { /** * Return the encapsulated SVGDocument. Added: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java (rev 0) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java 2025-05-04 12:57:11 UTC (rev 2796) @@ -0,0 +1,53 @@ +/* + * Copyright 2025 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.graphic; + +import org.axsl.graphic.output.GraphicJava2d; +import org.axsl.graphic.output.GraphicOutput; +import org.axsl.graphic.output.GraphicPdf; +import org.axsl.graphic.output.GraphicPs; + +/** + * A graphic that is drawn or painted. + */ +public interface VectorGraphic extends Graphic { + + /** + * Provide a {@link GraphicOutput} implementation for a given mime type. + * This is only useful for vector graphics. + * Other graphics should return null. + * The purpose of this general design pattern is to allow implementations to support arbitrary output types. + * However, interfaces for some output types are included in aXSL, and implementations should return instances of + * these types for the corresponding mime-type: + * <ul> + * <li>Pseudo-mime "java/java2d" should return an instance of {@link GraphicJava2d}.</li> + * <li>Mime "application/pdf" should return an instance of {@link GraphicPdf}.</li> + * <li>Mime "application/postscript" should return an instance of {@link GraphicPs}.</li> + * </ul> + * @param mimeType The mime type for which the GraphicOutput instance should be obtained. + * @return A GraphicOutput implementation for the requested mime type. + */ + GraphicOutput getGraphicOutput(String mimeType); + +} Property changes on: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/VectorGraphic.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-05-04 11:59:48
|
Revision: 2795 http://sourceforge.net/p/axsl/code/2795 Author: victormote Date: 2025-05-04 11:59:31 +0000 (Sun, 04 May 2025) Log Message: ----------- Remove unnecessary method. Modified Paths: -------------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java Added Paths: ----------- trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-build-publishToMavenLocal.launch Added: trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-build-publishToMavenLocal.launch =================================================================== --- trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-build-publishToMavenLocal.launch (rev 0) +++ trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-build-publishToMavenLocal.launch 2025-05-04 11:59:31 UTC (rev 2795) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.buildship.core.launch.runconfiguration"> + <listAttribute key="arguments"/> + <booleanAttribute key="build_scans_enabled" value="false"/> + <stringAttribute key="gradle_distribution" value="GRADLE_DISTRIBUTION(WRAPPER)"/> + <stringAttribute key="gradle_user_home" value=""/> + <stringAttribute key="java_home" value=""/> + <listAttribute key="jvm_arguments"/> + <booleanAttribute key="offline_mode" value="false"/> + <booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/> + <booleanAttribute key="override_workspace_settings" value="false"/> + <booleanAttribute key="show_console_view" value="true"/> + <booleanAttribute key="show_execution_view" value="true"/> + <listAttribute key="tasks"> + <listEntry value="build"/> + <listEntry value="publishToMavenLocal"/> + </listAttribute> + <stringAttribute key="working_dir" value="${workspace_loc:/axsl}"/> +</launchConfiguration> Property changes on: trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-build-publishToMavenLocal.launch ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev \ No newline at end of property Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-05-03 20:29:51 UTC (rev 2794) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-05-04 11:59:31 UTC (rev 2795) @@ -256,8 +256,8 @@ /** * Provide a {@link GraphicOutput} implementation for a given mime type. - * If the mime type is not supported, an unchecked {@link UnsupportedOperationException} will be thrown. - * To avoid this, use {@link #canMakeGraphicOutput(String)} to check the capability first. + * This is only useful for vector graphics. + * Other graphics should return null. * The purpose of this general design pattern is to allow implementations to support arbitrary output types. * However, interfaces for some output types are included in aXSL, and implementations should return instances of * these types for the corresponding mime-type: @@ -271,13 +271,4 @@ */ GraphicOutput getGraphicOutput(String mimeType); - /** - * Indicates whether this Graphic instance is capable of creating a {@link GraphicOutput} instance for a given mime - * type. - * @param mimeType The mime type for which we are checking the capability. - * @return True if and only if this Graphic instance is able to create a GraphicOutput instance for the given mime - * type. - */ - boolean canMakeGraphicOutput(String mimeType); - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-05-03 20:30:08
|
Revision: 2794 http://sourceforge.net/p/axsl/code/2794 Author: victormote Date: 2025-05-03 20:29:51 +0000 (Sat, 03 May 2025) Log Message: ----------- Include "get" in some getter methods, for clarity. Modified Paths: -------------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/GraphicServer.java Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-05-03 18:14:25 UTC (rev 2793) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-05-03 20:29:51 UTC (rev 2794) @@ -115,7 +115,7 @@ * @return The image width, in pixels, or -1 if that value is not known. * @exception GraphicException For errors during parsing of the graphic content. */ - int pixelWidth() throws GraphicException; + int getPixelWidth() throws GraphicException; /** * Return the image height, in pixels, if available. @@ -122,7 +122,7 @@ * @return The image height, in pixels, or -1 if that value is not known. * @exception GraphicException For errors during parsing of the graphic content. */ - int pixelHeight() throws GraphicException; + int getPixelHeight() throws GraphicException; /** * For image formats that store such information, return the image width, in millipoints. @@ -134,7 +134,7 @@ * @return The image width, in millipoints, or -1 if that value is not known. * @exception GraphicException For errors during parsing of the graphic content. */ - int absoluteWidth(int pixelsPerInch) throws GraphicException; + int getAbsoluteWidth(int pixelsPerInch) throws GraphicException; /** * For image formats that store such information, return the image height, in millipoints. @@ -146,7 +146,7 @@ * @return The image height, in millipoints, or -1 if that value is not known. * @exception GraphicException For errors during parsing of the graphic content. */ - int absoluteHeight(int pixelsPerInch) throws GraphicException; + int getAbsoluteHeight(int pixelsPerInch) throws GraphicException; /** * Return the image color space. Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/GraphicServer.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/GraphicServer.java 2025-05-03 18:14:25 UTC (rev 2793) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/GraphicServer.java 2025-05-03 20:29:51 UTC (rev 2794) @@ -38,8 +38,8 @@ /** * Factory method to find or create a Graphic instance. * @param graphicLocation The location of the graphic. - * @param cacheThisGraphic Set to true if the server should retain a reference to {@code graphicLocation} for later - * retrieval. + * @param cacheThisGraphic Set to true if the server should retain a reference to graphic parsed from + * {@code graphicLocation} for later retrieval. * Set to false to avoid spending the memory for this. * @return The Graphic instance. * @exception GraphicException For errors during construction. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-05-03 18:14:42
|
Revision: 2793 http://sourceforge.net/p/axsl/code/2793 Author: victormote Date: 2025-05-03 18:14:25 +0000 (Sat, 03 May 2025) Log Message: ----------- Whitespace and minor doc changes. Modified Paths: -------------- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java =================================================================== --- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-04-26 17:35:00 UTC (rev 2792) +++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-05-03 18:14:25 UTC (rev 2793) @@ -37,11 +37,9 @@ /** * Interface for Graphics. Graphics, as used here, may include: * <ul> - * <li>Raster images, also known as bitmapped images or sampled images. Examples - * include TIFF and JPEG.</li> - * <li>Vector drawings. Examples include SVG and (usually) EPS.</li> - * <li>Containers. Examples include PDF, which can, in some applications, be - * embedded inside other documents.</li> + * <li>Raster images, also known as bitmapped images or sampled images. Examples include TIFF and JPEG.</li> + * <li>Vector drawings. Examples include SVG and (usually) EPS.</li> + * <li>Containers. Examples include PDF, which can, in some applications, be embedded inside other documents.</li> * </ul> */ public interface Graphic { @@ -99,10 +97,9 @@ } /** - * Indicates whether a graphic has its colors inverted. Some applications, - * most notably Adobe Photoshop, invert the image colors, and client - * applications need to know this in order to be able to render the - * graphic properly. + * Indicates whether a graphic has its colors inverted. + * Some applications, most notably Adobe Photoshop, invert the image colors, and client applications need to know + * this in order to be able to render the graphic properly. * @return True if and only if the data for this graphic have the colors inverted. */ boolean isInverted(); @@ -116,8 +113,7 @@ /** * Return the image width, in pixels, if available. * @return The image width, in pixels, or -1 if that value is not known. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ int pixelWidth() throws GraphicException; @@ -124,56 +120,49 @@ /** * Return the image height, in pixels, if available. * @return The image height, in pixels, or -1 if that value is not known. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ int pixelHeight() throws GraphicException; /** - * For image formats that store such information, return the image width, - * in millipoints. A millipoint, as used here, is 1/72,000 of an inch. - * @param pixelsPerInch The density factor that should be used if the - * graphic does not know its absolute width, but does know its pixel width. - * Set this value to less than one to ensure that the fallback computation - * based on density will return -1 if the absolute width is not known. - * @return The image width, in millipoints, or -1 if that value is not - * known. - * @exception GraphicException For errors during parsing of the graphic - * content. + * For image formats that store such information, return the image width, in millipoints. + * A millipoint, as used here, is 1/72,000 of an inch. + * @param pixelsPerInch The density factor that should be used if the graphic does not know its absolute width, but + * does know its pixel width. + * Set this value to less than one to ensure that the fallback computation based on density will return -1 if the + * absolute width is not known. + * @return The image width, in millipoints, or -1 if that value is not known. + * @exception GraphicException For errors during parsing of the graphic content. */ int absoluteWidth(int pixelsPerInch) throws GraphicException; /** - * For image formats that store such information, return the image height, - * in millipoints. A millipoint, as used here, is 1/72,000 of an inch. - * @param pixelsPerInch The density factor that should be used if the - * graphic does not know its absolute height, but does know its pixel - * height. - * Set this value to less than one to ensure that the fallback computation - * based on density will return -1 if the absolute width is not known. - * @return The image height, in millipoints, or -1 if that value is not - * known. - * @exception GraphicException For errors during parsing of the graphic - * content. + * For image formats that store such information, return the image height, in millipoints. + * A millipoint, as used here, is 1/72,000 of an inch. + * @param pixelsPerInch The density factor that should be used if the graphic does not know its absolute height, but + * does know its pixel height. + * Set this value to less than one to ensure that the fallback computation based on density will return -1 if the + * absolute width is not known. + * @return The image height, in millipoints, or -1 if that value is not known. + * @exception GraphicException For errors during parsing of the graphic content. */ int absoluteHeight(int pixelsPerInch) throws GraphicException; /** - * Return the image color space: DeviceGray, DeviceRGB, or DeviceCMYK. - * @return the image color space - * @exception GraphicException For errors during parsing of the graphic - * content. + * Return the image color space. + * @return The image color space. + * @exception GraphicException For errors during parsing of the graphic content. */ ColorSpace getColorSpace() throws GraphicException; /** - * Return the number of uncompressed bits per component for this graphic. - * For example, a typical opaque RGB image has 3 components, each component - * using 8 bits to describe its integral value from 0 to 255, and this - * method would return 8. + * Return the number of uncompressed bits per component or channel for this graphic. + * For example, a typical opaque RGB image has 3 components, each component using 8 bits to describe its integral + * value from 0 to 255, and this method would return 8. + * The number of components or channels can be obtained by 1) getting the color space {@link #getColorSpace()}, then + * from it getting the number of components {@link ColorSpace#getNumComponents()}. * @return The number of bits per component. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ int getBitsPerComponent() throws GraphicException; @@ -180,8 +169,7 @@ /** * Indicates whether this image is transparent. * @return True if and only if the image is transparent. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ boolean isTransparent() throws GraphicException; @@ -188,8 +176,7 @@ /** * Return the transparent color, if any. * @return The transparent color, or null if the image is not transparent. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ Color getTransparentColor() throws GraphicException; @@ -196,36 +183,28 @@ /** * Return the raw content of the sample portion of the graphic. * This content may be either compressed or uncompressed. - * This method is provided to avoid unnecessary filtering when that is - * possible. - * For example, JPEG images are compressed using a DCT filter, so - * applications that wish to embed the JPEG data using a DCT filter can - * avoid the overhead of having the graphic convert itself to a standard - * format (see {@link #getContent()}, and then needing to recompress it - * after getting the uncompressed image. + * This method is provided to avoid unnecessary filtering when that is possible. + * For example, JPEG images are compressed using a DCT filter, so applications that wish to embed the JPEG data + * using a DCT filter can avoid the overhead of having the graphic convert itself to a standard format (see + * {@link #getContent()}, and then needing to recompress it after getting the uncompressed image. * @return The raw content of the sample portion of the graphic content. * Graphics that contain only vector data (no image samples) return null. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ ByteSequence getRawSamples() throws GraphicException; /** * Return the uncompressed content of the graphic. - * This content is provided in a standard image coordinate system and - * scanning order format that is used by PostScript and PDF. - * This format is described in Section 4.8.3 of the "PDF Reference, 5th - * Edition." - * Briefly, the pixels or samples are ordered from left-to-right, and from - * top-to-bottom, with the first row read entirely, then the second row, - * etc. - * The {@link #getColorSpace()} and the {@link #getBitsPerComponent()} - * indicate the number of channels, order of the channels, and number of - * bits that are used to describe each image sample. + * This content is provided in a standard image coordinate system and scanning order format that is used by + * PostScript and PDF. + * This format is described in Section 4.8.3 of the "PDF Reference, 5th Edition." + * Briefly, the pixels or samples are ordered from left-to-right, and from top-to-bottom, with the first row read + * entirely, then the second row, etc. + * The {@link #getColorSpace()} and the {@link #getBitsPerComponent()} indicate the number of channels, order of the + * channels, and number of bits that are used to describe each image sample. * @return The graphic content. * Graphics that contain only vector data (no image samples) return null. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ ByteSequence getContent() throws GraphicException; @@ -232,17 +211,15 @@ /** * Return the graphic content size, in bytes (uncompressed). * @return The graphic content size, in bytes. - * @exception GraphicException For errors during parsing of the graphic - * content. + * @exception GraphicException For errors during parsing of the graphic content. */ int getContentSize() throws GraphicException; /** - * Tells the server that the client application is done with this graphic, - * which gives the server an opportunity to release any resources devoted - * to this graphic. - * Implementations are expected to release such resources unless they have - * been instructed to cache the graphic for future use. + * Tells the server that the client application is done with this graphic, which gives the server an opportunity to + * release any resources devoted to this graphic. + * Implementations are expected to release such resources unless they have been instructed to cache the graphic for + * future use. */ void close(); @@ -254,10 +231,8 @@ /** * Indicates the type of compression used in this graphic. - * @return The type of compression used in this graphic, or null if it is - * not known. - * @throws GraphicException If an error occurs attempting to find the - * compression scheme. + * @return The type of compression used in this graphic, or null if it is not known. + * @throws GraphicException If an error occurs attempting to find the compression scheme. */ Graphic.Compression getCompressionType() throws GraphicException; @@ -268,10 +243,8 @@ String getMimeType(); /** - * Return the name of the Graphic. Some graphic formats include a name as - * part of their meta information. - * @return The name of this graphic, or null if no name is available in the - * graphic. + * Return the name of the Graphic. Some graphic formats include a name as part of their meta information. + * @return The name of this graphic, or null if no name is available in the graphic. */ String getName(); @@ -283,35 +256,27 @@ /** * Provide a {@link GraphicOutput} implementation for a given mime type. - * If the mime type is not supported, an unchecked - * {@link UnsupportedOperationException} will be thrown. - * To avoid this, use {@link #canMakeGraphicOutput(String)} to check the - * capability first. - * The purpose of this general design pattern is to allow implementations to - * support arbitrary output types. - * However, interfaces for some output types are included in aXSL, and - * implementations should returns instances of these types for the - * corresponding mime-type: + * If the mime type is not supported, an unchecked {@link UnsupportedOperationException} will be thrown. + * To avoid this, use {@link #canMakeGraphicOutput(String)} to check the capability first. + * The purpose of this general design pattern is to allow implementations to support arbitrary output types. + * However, interfaces for some output types are included in aXSL, and implementations should return instances of + * these types for the corresponding mime-type: * <ul> - * <li>Pseudo-mime "java/java2d" should return an instance of - * {@link GraphicJava2d}.</li> - * <li>Mime "application/pdf" should return an instance of - * {@link GraphicPdf}.</li> - * <li>Mime "application/postscript" should return an instance of - * {@link GraphicPs}.</li> + * <li>Pseudo-mime "java/java2d" should return an instance of {@link GraphicJava2d}.</li> + * <li>Mime "application/pdf" should return an instance of {@link GraphicPdf}.</li> + * <li>Mime "application/postscript" should return an instance of {@link GraphicPs}.</li> * </ul> - * @param mimeType The mime type for which the GraphicOutput instance should - * be obtained. + * @param mimeType The mime type for which the GraphicOutput instance should be obtained. * @return A GraphicOutput implementation for the requested mime type. */ GraphicOutput getGraphicOutput(String mimeType); /** - * Indicates whether this Graphic instance is capable of creating a - * {@link GraphicOutput} instance for a given mime type. + * Indicates whether this Graphic instance is capable of creating a {@link GraphicOutput} instance for a given mime + * type. * @param mimeType The mime type for which we are checking the capability. - * @return True if and only if this Graphic instance is able to create a GraphicOutput - * instance for the given mime type. + * @return True if and only if this Graphic instance is able to create a GraphicOutput instance for the given mime + * type. */ boolean canMakeGraphicOutput(String mimeType); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 17:35:18
|
Revision: 2792 http://sourceforge.net/p/axsl/code/2792 Author: victormote Date: 2025-04-26 17:35:00 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Rename interface for clarity. Modified Paths: -------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/GlyphList.java Added Paths: ----------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/EncodingVector.java Removed Paths: ------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsEncoding.java Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java 2025-04-26 15:15:10 UTC (rev 2791) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java 2025-04-26 17:35:00 UTC (rev 2792) @@ -24,7 +24,7 @@ package org.axsl.ps; /** - * Superinterface for all character-to-glyph-index encoding schemes, including {@link PsEncoding} and {@link Cmap}. + * Superinterface for all character-to-glyph-index encoding schemes, including {@link EncodingVector} and {@link Cmap}. */ public interface Encoding { Copied: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/EncodingVector.java (from rev 2783, trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsEncoding.java) =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/EncodingVector.java (rev 0) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/EncodingVector.java 2025-04-26 17:35:00 UTC (rev 2792) @@ -0,0 +1,194 @@ +/* + * Copyright 2004 The aXSL Project. + * http://www.axsl.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. + */ + +/* + * $LastChangedRevision$ + * $LastChangedDate$ + * $LastChangedBy$ + */ + +package org.axsl.ps; + +import java.util.List; + +/** + * <p>Implementations represent a PostScript-style Encoding, that is, a mapping from character to glyph index that is + * based on the character's location in an array (vector).</p> + * + * <p>When a PostScript file is parsed, the characters in a string are really indices into an array of glyph names, + * which are in turn the keys to entries in a glyph dictionary. + * Input to a PostScript interpreter is not really characters, but rather character indexes. + * (The two might be the same, especially for ASCII characters).</p> + + * <p>The PostScript interpreter conceptually uses a two-step process, as follows: + * <ol> + * <li>It uses character codes (integer values), i.e. the text, as indexes into an array of glyph name objects like /A + * or /Uacute. This array is known as an "encoding". + * There are several standard encoding schemes defined in the PostScript standard that each interpreter must know + * how to handle. + * Those are provided as Encoding subclasses.</li> + * <li>The name objects created in step 1 are then used as the key into a dictionary (contained in the Font + * dictionary) whose values contain the PostScript instructions needed to actually paint the glyph.</li> + * </ol> + * + * <p>Encoding instances provide some standard encoding resources for PostScript.</p> + * <p>Nowhere in the above scheme is Unicode encoding contemplated or supported. + * Applications that <em>create </em> PostScript output from Unicode input need a way to convert from that Unicode input + * to the indexes that are expected for by the selected encoding. + * The closest resource that we have for this purpose is the standard glyph lists supplied by Adobe.</p> + * + * <p>The canonical method for mapping a Unicode code point to a PostScript encoding index would be:</p> + * <ol> + * <li>Use the Adobe Glyph List (or another glyph list) to obtain the glyph name for a given Unicode code point.</li> + * <li>Use an Encoding instance to obtain the index in that Encoding for the glyph name obtained above.</li> + * </ol> + * + * <p>However, for efficiency, implementations of {@link EncodingVector} usually combine the above two steps and provide + * a direct mapping from a Unicode code point to the encoded index. + * Methods are provided to encode and decode characters.</p> + */ +public interface EncodingVector extends Encoding { + + /** + * An enumeration of the standard encodings supported by PostScript and/or PDF. + * Note that these predefined encodings, while standard in nature, may or may not be built-in to the PostScript + * interpreter and/or a PDF viewer. + */ + enum Predefined { + + /** The "Standard" or "Adobe Standard" encoding. */ + STANDARD("StandardEncoding"), + + /** The ISO Latin Encoding. */ + ISO_LATIN_1("ISOLatin1Encoding"), + + /** The Windows ANSI encoding. */ + WIN_ANSI("WinAnsiEncoding"), + + /** The encoding used by the Adobe Symbols font. */ + SYMBOL("SymbolEncoding"), + + /** The encoding used by the Adobe Zapf Dingbats font. */ + ZAPF_DINGBATS("ZapfDingbatsEncoding"), + + /** The encoding for Central European languages. */ + CE("CEEncoding"), + + /** The Macintosh encoding for Latin languages. */ + MAC_ROMAN("MacRomanEncoding"), + + /** The encoding used for internal PDF Document objects like bookmarks and document information. */ + PDF_DOC("PDFDocEncoding"), + + /** The Macintosh encoding for expert fonts. */ + MAC_EXPERT("MacExpertEncoding"), + + /** The standard encoding for expert fonts. ("Expert" here refers to features like small caps, old style + * figures, etc. */ + EXPERT("ExpertEncoding"), + + /** The standard encoding for fonts containing a subset of the expert features. */ + EXPERT_SUBSET("ExpertSubsetEncoding"), + + /** The standard Macintosh encoding. */ + STANDARD_MACINTOSH_ORDERING("MacStandardEncoding"); + + /** The name of the encoding. */ + private String name; + + /** + * Private Constructor. + * @param name The name used to describe the encoding in PostScript files. + */ + Predefined(final String name) { + this.name = name; + } + + /** + * Returns the name of this encoding. + * @return The name of this encoding. + */ + public String getName() { + return this.name; + } + + /** + * Finds the instance that matches a given name. + * @param name The name of the predefined Encoding vector to find. + * @return The predefined encoding vector matching {@code name}, or null if no such encoding exists. + */ + public static Predefined findByName(final String name) { + for (int i = 0; i < EncodingVector.Predefined.values().length; i++) { + final Predefined vector = EncodingVector.Predefined.values()[i]; + if (vector.getName().equals(name)) { + return vector; + } + } + /* Handle special cases. */ + if ("AdobeStandardEncoding".equals(name)) { + return EncodingVector.Predefined.STANDARD; + } + return null; + } + + } + + /** + * Method useful for determining what, if any, EncodingVector should be + * used as the base encoding when writing this EncodingVector in PDF. + * In PDF, an EncodingVector can be written as a set of differences from + * one of the standard PDF EncodingVectors. (There does not seem to be a + * similar capability in PostScript). + * @return The best base-encoding that should be used when writing this + * encoding to PostScript, or null if this encoding vector should be + * written in its entirety. + */ + EncodingVector bestBaseEncodingPdf(); + + /** + * Finds the glyph name that corresponds to a given Unicode code point. + * @param codePoint The Unicode code point for which the glyph name is + * desired. + * @return The glyph name, or null if none is found in this encoding's + * glyph lists. + */ + String mapCodePointToGlyphName(int codePoint); + + /** + * Determines whether all items encoded in this EncodingVector are also encoded the same way in another + * EncodingVector. + * If so, then this instance is really superfluous. + * @param otherVector The EncodingVector instance to which {@code this} should be compared. + * @return True if and only if {@code otherVector} encodes all items that {@code this} does, and encodes them the + * same way. + */ + boolean isSubsetOf(EncodingVector otherVector); + + /** + * Returns the predefined type, if any, of this encoding vector. + * @return The predefined type of this encoding vector, or null if this is not a predefined encoding vector. + */ + EncodingVector.Predefined getPredefinedType(); + + /** + * Returns the array of glyph names that represents this encoding. + * The index is the encoding index for the glyph name at that index. + * @return The glyph name array for this encoding. + */ + List<String> getGlyphNames(); + +} Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/GlyphList.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/GlyphList.java 2025-04-26 15:15:10 UTC (rev 2791) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/GlyphList.java 2025-04-26 17:35:00 UTC (rev 2792) @@ -26,7 +26,7 @@ /** * Maps glyph names to Unicode code points. * Such a mapping is needed because Type 1 fonts are keyed by names, and these names must be mapped to their - * corresponding code points before an {@link PsEncoding} can be built. + * corresponding code points before an {@link EncodingVector} can be built. */ public interface GlyphList { Deleted: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsEncoding.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsEncoding.java 2025-04-26 15:15:10 UTC (rev 2791) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsEncoding.java 2025-04-26 17:35:00 UTC (rev 2792) @@ -1,198 +0,0 @@ -/* - * Copyright 2004 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.ps; - -import java.util.List; - -/** - * <p>{@link PsEncoding} implementations represent what PostScript and PDF call an Encoding, that is, a mapping from - * character to glyph index that is based on the character's location in an array (vector).</p> - * - * <p>When a PostScript file is parsed, the characters in a string are really indices into an array of glyph names, - * which are in turn the keys to entries in a glyph dictionary. - * Input to a PostScript interpreter is not really characters, but rather character indexes. - * (The two might be the same, especially for ASCII characters).</p> - - * <p>The PostScript interpreter conceptually uses a two-step process, as follows: - * <ol> - * <li>It uses character codes (integer values), i.e. the text, as indexes into an array of glyph name objects like /A - * or /Uacute. This array is known as an "encoding". - * There are several standard encoding schemes defined in the PostScript standard that each interpreter must know - * how to handle. - * Those are provided as Encoding subclasses.</li> - * <li>The name objects created in step 1 are then used as the key into a dictionary (contained in the Font - * dictionary) whose values contain the PostScript instructions needed to actually paint the glyph.</li> - * </ol> - * - * <p>Encoding instances provide some standard encoding resources for PostScript.</p> - * <p>Nowhere in the above scheme is Unicode encoding contemplated or supported. - * Applications that <em>create </em> PostScript output from Unicode input need a way to convert from that Unicode input - * to the indexes that are expected for by the selected encoding. - * The closest resource that we have for this purpose is the standard glyph lists supplied by Adobe.</p> - * - * <p>The canonical method for mapping a Unicode code point to a PostScript encoding index would be:</p> - * <ol> - * <li>Use the Adobe Glyph List (or another glyph list) to obtain the glyph name for a given Unicode code point.</li> - * <li>Use an Encoding instance to obtain the index in that Encoding for the glyph name obtained above.</li> - * </ol> - * - * <p>However, for efficiency, implementations of {@link PsEncoding} combine the above two steps and provide a direct - * mapping from a Unicode code point to the encoded index. - * Two parallel arrays are used to make this process efficient. - * The first is a an array of all Unicode code points supported in the Encoding. - * This array is sorted for fast searching. - * The second array provides the encoded index for the Unicode code point in the first array. - * Methods are provided to encode and decode characters.</p> - */ -public interface PsEncoding extends Encoding { - - /** - * An enumeration of the standard encodings supported by PostScript and/or PDF. - * Note that these predefined encodings, while standard in nature, may or may not be built-in to the PostScript - * interpreter and/or a PDF viewer. - */ - enum Predefined { - - /** The "Standard" or "Adobe Standard" encoding. */ - STANDARD("StandardEncoding"), - - /** The ISO Latin Encoding. */ - ISO_LATIN_1("ISOLatin1Encoding"), - - /** The Windows ANSI encoding. */ - WIN_ANSI("WinAnsiEncoding"), - - /** The encoding used by the Adobe Symbols font. */ - SYMBOL("SymbolEncoding"), - - /** The encoding used by the Adboe Zapf Dingbats font. */ - ZAPF_DINGBATS("ZapfDingbatsEncoding"), - - /** The encoding for Central European languages. */ - CE("CEEncoding"), - - /** The Macintosh encoding for Latin languages. */ - MAC_ROMAN("MacRomanEncoding"), - - /** The encoding used for internal PDF Document objects like bookmarks and document information. */ - PDF_DOC("PDFDocEncoding"), - - /** The Macintosh encoding for expert fonts. */ - MAC_EXPERT("MacExpertEncoding"), - - /** The standard encoding for expert fonts. ("Expert" here refers to features like small caps, old style - * figures, etc. */ - EXPERT("ExpertEncoding"), - - /** The standard encoding for fonts containing a subset of the expert features. */ - EXPERT_SUBSET("ExpertSubsetEncoding"), - - /** The standard Macintosh encoding. */ - STANDARD_MACINTOSH_ORDERING("MacStandardEncoding"); - - /** The name of the encoding. */ - private String name; - - /** - * Private Constructor. - * @param name The name used to describe the encoding in PostScript files. - */ - Predefined(final String name) { - this.name = name; - } - - /** - * Returns the name of this encoding. - * @return The name of this encoding. - */ - public String getName() { - return this.name; - } - - /** - * Finds the instance that matches a given name. - * @param name The name of the predefined Encoding vector to find. - * @return The predefined encoding vector matching {@code name}, or null if no such encoding exists. - */ - public static Predefined findByName(final String name) { - for (int i = 0; i < PsEncoding.Predefined.values().length; i++) { - final Predefined vector = PsEncoding.Predefined.values()[i]; - if (vector.getName().equals(name)) { - return vector; - } - } - /* Handle special cases. */ - if ("AdobeStandardEncoding".equals(name)) { - return PsEncoding.Predefined.STANDARD; - } - return null; - } - - } - - /** - * Method useful for determining what, if any, EncodingVector should be - * used as the base encoding when writing this EncodingVector in PDF. - * In PDF, an EncodingVector can be written as a set of differences from - * one of the standard PDF EncodingVectors. (There does not seem to be a - * similar capability in PostScript). - * @return The best base-encoding that should be used when writing this - * encoding to PostScript, or null if this encoding vector should be - * written in its entirety. - */ - PsEncoding bestBaseEncodingPdf(); - - /** - * Finds the glyph name that corresponds to a given Unicode code point. - * @param codePoint The Unicode code point for which the glyph name is - * desired. - * @return The glyph name, or null if none is found in this encoding's - * glyph lists. - */ - String mapCodePointToGlyphName(int codePoint); - - /** - * Determines whether all items encoded in this EncodingVector are also encoded the same way in another - * EncodingVector. - * If so, then this instance is really superfluous. - * @param otherVector The EncodingVector instance to which {@code this} should be compared. - * @return True if and only if {@code otherVector} encodes all items that {@code this} does, and encodes them the - * same way. - */ - boolean isSubsetOf(PsEncoding otherVector); - - /** - * Returns the predefined type, if any, of this encoding vector. - * @return The predefined type of this encoding vector, or null if this is not a predefined encoding vector. - */ - PsEncoding.Predefined getPredefinedType(); - - /** - * Returns the array of glyph names that represents this encoding. - * The index is the encoding index for the glyph name at that index. - * @return The glyph name array for this encoding. - */ - List<String> getGlyphNames(); - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 15:15:27
|
Revision: 2791 http://sourceforge.net/p/axsl/code/2791 Author: victormote Date: 2025-04-26 15:15:10 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove no-longer-needed methods. Modified Paths: -------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 14:42:55 UTC (rev 2790) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 15:15:10 UTC (rev 2791) @@ -23,14 +23,11 @@ package org.axsl.ps; -import org.axsl.primitive.sequence.IntSequence; - import java.awt.Graphics2D; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.util.List; /** * Provides PostScript-related services to client applications. @@ -95,42 +92,4 @@ */ PsInterpreter createInterpreter(PsInput psInput, PsSystemDict systemDict) throws PsException; - /** - * Creates a new EncodingVector instance and registers it for later use. - * @param name The name of this encoding. - * @param codePoints The sequence of Unicode code points supported by this encoding. - * @param codePointIndexes The sequence of encoded indexes that is parallel to {@code codePoints}. - * codePointIndexes[n] should contain the encoded index that corresponds to the Unicode code point at codePoints[n]. - * The number of glyphs in a font appears to be constrained to 16 bits, but this parameter allows for 32 bits, - * allowing for other uses of an encoding and future changes to font capabilities. - * @return The newly-created implementation-specific EncodingVector instance. - * @see "https://docs.microsoft.com/en-us/typography/opentype/spec/maxp" - */ - PsEncoding createEncodingVector(String name, IntSequence codePoints, IntSequence codePointIndexes); - - /** - * Parse an encoding vector from an input stream. - * @param name The name of the encoding vector to be parsed. - * @param inputStream The input stream containing the raw encoding vector information. - * @param columnNum The column number in the input file that should be read to get the encoded value for this - * encoding. - * Column number 1 is the first field after the glyph name, that is, field 2. - * @param radix The radix of the numbering system (10 for decimal, 8 for octal, etc.). - * @param glyphLists A space-separated list of glyph lists to be consulted when mapping glyph names to Unicode code - * points. - * @return The parsed encoding vector. - * @throws IOException For errors opening or reading the input stream. - * @throws PsException For errors parsing the encoding vector. - */ - PsEncoding parseEncodingVector(String name, InputStream inputStream, int columnNum, int radix, - List<String> glyphLists) throws IOException, PsException; - - /** - * Creates a new CharSet. - * @param name The name of this character set. - * @param characterSet The array containing the code points in the new character set. - * @return The newly-created implementation-specific CharSet instance. - */ - CharSet createCharSet(String name, IntSequence characterSet); - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 14:43:12
|
Revision: 2790 http://sourceforge.net/p/axsl/code/2790 Author: victormote Date: 2025-04-26 14:42:55 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove no-longer-needed methods. Modified Paths: -------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 14:03:09 UTC (rev 2789) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 14:42:55 UTC (rev 2790) @@ -96,22 +96,6 @@ PsInterpreter createInterpreter(PsInput psInput, PsSystemDict systemDict) throws PsException; /** - * Returns one of the predefined encodings. - * @param name The name of the predefined encoding to be returned. - * @return The predefined encoding if it can be found or created, or null otherwise. - * @see #getPredefinedEncoding(PsEncoding.Predefined) - */ - PsEncoding getPredefinedEncoding(String name); - - /** - * Returns one of the predefined encodings. - * @param predefinedVector The predefined encoding to be returned. - * @return The predefined encoding if it can be found or created, or null otherwise. - * @see #getPredefinedEncoding(String) - */ - PsEncoding getPredefinedEncoding(PsEncoding.Predefined predefinedVector); - - /** * Creates a new EncodingVector instance and registers it for later use. * @param name The name of this encoding. * @param codePoints The sequence of Unicode code points supported by this encoding. @@ -142,22 +126,6 @@ List<String> glyphLists) throws IOException, PsException; /** - * Returns one of the predefined character sets. - * @param name The name of the predefined character set to be returned. - * @return The predefined character set if it can be found or created, or null otherwise. - * @see #getPredefinedCharSet(org.axsl.ps.CharSet.Predefined) - */ - CharSet getPredefinedCharSet(String name); - - /** - * Returns one of the predefined character sets. - * @param predefined The predefined character set to be returned. - * @return The predefined character set if it can be found or created, or null otherwise. - * @see #getPredefinedCharSet(org.axsl.ps.CharSet.Predefined) - */ - CharSet getPredefinedCharSet(CharSet.Predefined predefined); - - /** * Creates a new CharSet. * @param name The name of this character set. * @param characterSet The array containing the code points in the new character set. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 14:03:27
|
Revision: 2789 http://sourceforge.net/p/axsl/code/2789 Author: victormote Date: 2025-04-26 14:03:09 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove no-longer-needed method. Modified Paths: -------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 13:42:33 UTC (rev 2788) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 14:03:09 UTC (rev 2789) @@ -165,14 +165,4 @@ */ CharSet createCharSet(String name, IntSequence characterSet); - /** - * Parse a character set from an input stream. - * @param name The name of the character set to be parsed. - * @param inputStream The input stream containing the raw character set information. - * @return The parsed character set. - * @throws IOException For errors opening or reading the input stream. - * @throws PsException For errors parsing the character set. - */ - CharSet parseCharSet(String name, InputStream inputStream) throws IOException, PsException; - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 13:42:51
|
Revision: 2788 http://sourceforge.net/p/axsl/code/2788 Author: victormote Date: 2025-04-26 13:42:33 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove no-longer-needed method. Modified Paths: -------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 13:14:44 UTC (rev 2787) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 13:42:33 UTC (rev 2788) @@ -175,11 +175,4 @@ */ CharSet parseCharSet(String name, InputStream inputStream) throws IOException, PsException; - /** - * Returns one of the predefined glyphs lists. - * @param predefined The predefined glyph list to be returned. - * @return The predefined glyph list if it can be found or created, or null otherwise. - */ - GlyphList getPredefinedGlyphList(GlyphList.Predefined predefined); - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 13:15:04
|
Revision: 2787 http://sourceforge.net/p/axsl/code/2787 Author: victormote Date: 2025-04-26 13:14:44 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove no-longer-needed method. Modified Paths: -------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 12:20:52 UTC (rev 2786) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 13:14:44 UTC (rev 2787) @@ -182,14 +182,4 @@ */ GlyphList getPredefinedGlyphList(GlyphList.Predefined predefined); - /** - * Parse a glyph list from an input stream. - * @param name The name of the glyph list to be parsed. - * @param inputStream The input stream containing the raw glyph list information. - * @return The parsed glyph list. - * @throws IOException For errors opening or reading the input stream. - * @throws PsException For errors parsing the glyph list. - */ - GlyphList parseGlyphList(String name, InputStream inputStream) throws IOException, PsException; - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 12:21:09
|
Revision: 2786 http://sourceforge.net/p/axsl/code/2786 Author: victormote Date: 2025-04-26 12:20:52 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove no-longer-needed interface. Removed Paths: ------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap.java Deleted: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap.java 2025-04-26 12:04:22 UTC (rev 2785) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap.java 2025-04-26 12:20:52 UTC (rev 2786) @@ -1,31 +0,0 @@ -/* - * Copyright 2009 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.ps; - -/** - * A CMap. - */ -public interface Cmap extends Encoding { - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 12:04:39
|
Revision: 2785 http://sourceforge.net/p/axsl/code/2785 Author: victormote Date: 2025-04-26 12:04:22 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove no-longer-needed interfaces. Modified Paths: -------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java Removed Paths: ------------- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap04Ttf.java trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap12Ttf.java Deleted: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap04Ttf.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap04Ttf.java 2025-04-26 11:49:57 UTC (rev 2784) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap04Ttf.java 2025-04-26 12:04:22 UTC (rev 2785) @@ -1,50 +0,0 @@ -/* - * Copyright 2009 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.ps; - -/** - * CMap containing a set of Unicode code point ranges that sequentially map to the same-sized range of glyph indexes. - * The contents are analogous to a Format 4 TrueType Font cmap table (from which this interface derives its name). - */ -public interface Cmap04Ttf extends Cmap { - - /** - * Add a new entry to this map for contiguous values. - * @param unicodeStart The starting Unicode code point for this map. - * @param unicodeEnd The ending Unicode code point for this map. - * @param glyphStartIndex The starting glyph index for this map. - * This index is the encoded value for {@code unicodeStart}. - */ - void addEntry(int unicodeStart, int unicodeEnd, char glyphStartIndex); - - /** - * Add a new entry to this map for non-contiguous values. - * @param unicodeStart The starting Unicode code point for this map. - * @param unicodeEnd The ending Unicode code point for this map. - * @param glyphIndexes The array of glyph indexes corresponding to the range {@code unicodeStart} through - * {@code unicodeEnd}. - */ - void addEntry(int unicodeStart, int unicodeEnd, CharSequence glyphIndexes); - -} Deleted: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap12Ttf.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap12Ttf.java 2025-04-26 11:49:57 UTC (rev 2784) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Cmap12Ttf.java 2025-04-26 12:04:22 UTC (rev 2785) @@ -1,41 +0,0 @@ -/* - * Copyright 2009 The aXSL Project. - * http://www.axsl.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. - */ - -/* - * $LastChangedRevision$ - * $LastChangedDate$ - * $LastChangedBy$ - */ - -package org.axsl.ps; - -/** - * CMap containing a set of 32-bit Unicode ranges that sequentially map to the same-sized range of glyph indexes. - * The contents are analogous to a Format 12 TrueType Font cmap table (from which this interface derives its name). - */ -public interface Cmap12Ttf extends Cmap { - - /** - * Add a new entry to this map. - * @param unicodeStart The starting Unicode code point for this map. - * @param unicodeEnd The ending Unicode code point for this map. - * @param glyphStartIndex The starting glyph index for this map. - * This index is the encoded value for {@code unicodeStart}. - */ - void addEntry(int unicodeStart, int unicodeEnd, int glyphStartIndex); - -} Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java =================================================================== --- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 11:49:57 UTC (rev 2784) +++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/PsServer.java 2025-04-26 12:04:22 UTC (rev 2785) @@ -192,22 +192,4 @@ */ GlyphList parseGlyphList(String name, InputStream inputStream) throws IOException, PsException; - /** - * Creates a new Cmap04 with a given name and expected size. - * @param name The name of this encoding. - * @param expectedEntries The number of expected entries in this encoding. - * Setting this to the correct value gives the implementation an opportunity for more efficient processing. - * @return The newly-created implementation-specific Cmap04 instance. - */ - Cmap04Ttf createCmap04(String name, int expectedEntries); - - /** - * Creates a new Cmap12 with a given name and expected size. - * @param name The name of this encoding. - * @param expectedEntries The number of expected entries in this encoding. - * Setting this to the correct value gives the implementation an opportunity for more efficient processing. - * @return The newly-created implementation-specific Cmap12 instance. - */ - Cmap12Ttf createCmap12(String name, int expectedEntries); - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vic...@us...> - 2025-04-26 11:50:14
|
Revision: 2784 http://sourceforge.net/p/axsl/code/2784 Author: victormote Date: 2025-04-26 11:49:57 +0000 (Sat, 26 Apr 2025) Log Message: ----------- Remove Maven launch configs, add a Gradle one. Added Paths: ----------- trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-clean-publishToMavenLocal.launch Removed Paths: ------------- trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-deploy.launch trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-install.launch Deleted: trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-deploy.launch =================================================================== --- trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-deploy.launch 2025-04-20 16:01:28 UTC (rev 2783) +++ trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-deploy.launch 2025-04-26 11:49:57 UTC (rev 2784) @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType"> -<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/> -<stringAttribute key="M2_GOALS" value="clean deploy"/> -<booleanAttribute key="M2_NON_RECURSIVE" value="false"/> -<booleanAttribute key="M2_OFFLINE" value="false"/> -<stringAttribute key="M2_PROFILES" value=""/> -<listAttribute key="M2_PROPERTIES"> -<listEntry value="sonatype-password-for-user=Place Your Sonatype Password here"/> -</listAttribute> -<stringAttribute key="M2_RUNTIME" value="apache-maven-3.2.5"/> -<booleanAttribute key="M2_SKIP_TESTS" value="false"/> -<intAttribute key="M2_THREADS" value="1"/> -<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/> -<stringAttribute key="M2_USER_SETTINGS" value=""/> -<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/> -<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/axsl-all}/build-logs/axsl-all-deploy.log"/> -<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> -<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:axsl-02-all}"/> -</launchConfiguration> Deleted: trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-install.launch =================================================================== --- trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-install.launch 2025-04-20 16:01:28 UTC (rev 2783) +++ trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-all-install.launch 2025-04-26 11:49:57 UTC (rev 2784) @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType"> -<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/> -<stringAttribute key="M2_GOALS" value="clean install source:aggregate javadoc:aggregate-jar"/> -<booleanAttribute key="M2_NON_RECURSIVE" value="false"/> -<booleanAttribute key="M2_OFFLINE" value="false"/> -<stringAttribute key="M2_PROFILES" value=""/> -<listAttribute key="M2_PROPERTIES"/> -<stringAttribute key="M2_RUNTIME" value="apache-maven-3.2.5"/> -<booleanAttribute key="M2_SKIP_TESTS" value="false"/> -<intAttribute key="M2_THREADS" value="1"/> -<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/> -<stringAttribute key="M2_USER_SETTINGS" value=""/> -<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/> -<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/axsl-02-all}/build-logs/axsl-all-install.log"/> -<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> -<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:axsl-02-all}"/> -</launchConfiguration> Added: trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-clean-publishToMavenLocal.launch =================================================================== --- trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-clean-publishToMavenLocal.launch (rev 0) +++ trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-clean-publishToMavenLocal.launch 2025-04-26 11:49:57 UTC (rev 2784) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.buildship.core.launch.runconfiguration"> + <listAttribute key="arguments"/> + <booleanAttribute key="build_scans_enabled" value="false"/> + <stringAttribute key="gradle_distribution" value="GRADLE_DISTRIBUTION(WRAPPER)"/> + <stringAttribute key="gradle_user_home" value=""/> + <stringAttribute key="java_home" value=""/> + <listAttribute key="jvm_arguments"/> + <booleanAttribute key="offline_mode" value="false"/> + <booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/> + <booleanAttribute key="override_workspace_settings" value="false"/> + <booleanAttribute key="show_console_view" value="true"/> + <booleanAttribute key="show_execution_view" value="true"/> + <listAttribute key="tasks"> + <listEntry value="clean"/> + <listEntry value="publishToMavenLocal"/> + </listAttribute> + <stringAttribute key="working_dir" value="${workspace_loc:/axsl}"/> +</launchConfiguration> Property changes on: trunk/axsl/axsl-00-dev/scripts/eclipse/launch-configurations/axsl-gradle-clean-publishToMavenLocal.launch ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |