FontWeightRange (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.fonts.substitute

## Class FontWeightRange

- java.lang.Object
- - org.apache.fop.fonts.substitute.FontWeightRange

-     public class FontWeightRange
      extends Object

  Encapsulates a range of font weight values

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.apache.commons.logging.Log` | `log` logging instance

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FontWeightRange(int start, int end)` Main constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isWithinRange(int value)` Returns true if the given integer value is within this integer range
    `int[]` | `toArray()`
    `String` | `toString()`
    `static FontWeightRange` | `valueOf(String weightRangeString)` Returns an `FontWeightRange` object holding the range values of the specified `String`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### log

          protected static final org.apache.commons.logging.Log log

      logging instance

  - ### Constructor Detail

    - #### FontWeightRange

          public FontWeightRange(int start,
                                 int end)

      Main constructor
      Parameters:
        `start` - the start value range
        `end` - the end value range

  - ### Method Detail

    - #### valueOf

          public static FontWeightRange valueOf(String weightRangeString)

      Returns an `FontWeightRange` object holding the range values of the specified `String`.
      Parameters:
        `weightRangeString` - the value range string
      Returns:
        an `FontWeightRange` object holding the value ranges

    - #### isWithinRange

          public boolean isWithinRange(int value)

      Returns true if the given integer value is within this integer range
      Parameters:
        `value` - the integer value
      Returns:
        true if the given integer value is within this integer range

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toArray

          public int[] toArray()

      Returns:
        an integer array containing the weight ranges

Copyright © 2025 Apache Software Foundation. All rights reserved.