类 FontMath

java.lang.Object
com.google.typography.font.sfntly.math.FontMath

public final class FontMath extends Object
Utility math for fonts.
作者:
Stuart Gill
  • 构造器详细资料

    • FontMath

      private FontMath()
  • 方法详细资料

    • log2

      public static int log2(int a)
    • paddingRequired

      public static int paddingRequired(int size, int alignmentSize)
      Calculates the amount of padding needed. The values provided need to be in the same units. So, if the size is given as the number of bytes then the alignment size must also be specified as byte size to align to.
      参数:
      size - the size of the data that may need padding
      alignmentSize - the number of units to align to
      返回:
      the number of units needing to be added for alignment