Class Font

java.lang.Object
com.raylib.Font

public class Font extends Object
Font, font texture and GlyphInfo array data
  • Field Details

    • memorySegment

      public final MemorySegment memorySegment
      The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Details

    • Font

      public Font()
      Construct with auto memory allocator and fields initialized to zero.
    • Font

      public Font(SegmentAllocator arena)
      Construct with your owm memory allocator and fields not initialized
    • Font

      public Font(MemorySegment memorySegment)
      Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    • Font

      public Font(int baseSize, int glyphCount, int glyphPadding, Texture texture, Rectangle recs, GlyphInfo glyphs)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      baseSize - Base size (default chars height)
      glyphCount - Number of glyph characters
      glyphPadding - Padding around the glyph characters
      texture - Texture atlas containing the glyphs
      recs - Rectangles in texture for the glyphs
      glyphs - Glyphs info data
    • Font

      public Font(SegmentAllocator arena, int baseSize, int glyphCount, int glyphPadding, Texture texture, Rectangle recs, GlyphInfo glyphs)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      baseSize - Base size (default chars height)
      glyphCount - Number of glyph characters
      glyphPadding - Padding around the glyph characters
      texture - Texture atlas containing the glyphs
      recs - Rectangles in texture for the glyphs
      glyphs - Glyphs info data
  • Method Details

    • equals

      public boolean equals(Object o)
      Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getArrayElement

      public Font getArrayElement(int index)
    • allocateArray

      public static Font allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of Font
    • allocateArray

      public static Font allocateArray(long elementCount)
      Allocate an array of Font
    • getBaseSize

      public int getBaseSize()
      Base size (default chars height)
    • setBaseSize

      public void setBaseSize(int value)
      Base size (default chars height)
    • baseSize

      public int baseSize()
      Base size (default chars height)
    • baseSize

      public Font baseSize(int value)
      Base size (default chars height)
    • getGlyphCount

      public int getGlyphCount()
      Number of glyph characters
    • setGlyphCount

      public void setGlyphCount(int value)
      Number of glyph characters
    • glyphCount

      public int glyphCount()
      Number of glyph characters
    • glyphCount

      public Font glyphCount(int value)
      Number of glyph characters
    • getGlyphPadding

      public int getGlyphPadding()
      Padding around the glyph characters
    • setGlyphPadding

      public void setGlyphPadding(int value)
      Padding around the glyph characters
    • glyphPadding

      public int glyphPadding()
      Padding around the glyph characters
    • glyphPadding

      public Font glyphPadding(int value)
      Padding around the glyph characters
    • getTexture

      public Texture getTexture()
      Texture atlas containing the glyphs
    • setTexture

      public void setTexture(Texture value)
      Texture atlas containing the glyphs
    • texture

      public Texture texture()
      Texture atlas containing the glyphs
    • texture

      public Font texture(Texture value)
      Texture atlas containing the glyphs
    • getRecs

      public Rectangle getRecs()
      Rectangles in texture for the glyphs
    • setRecs

      public void setRecs(Rectangle value)
      Rectangles in texture for the glyphs
    • recs

      public Rectangle recs()
      Rectangles in texture for the glyphs
    • recs

      public Font recs(Rectangle value)
      Rectangles in texture for the glyphs
    • getGlyphs

      public GlyphInfo getGlyphs()
      Glyphs info data
    • setGlyphs

      public void setGlyphs(GlyphInfo value)
      Glyphs info data
    • glyphs

      public GlyphInfo glyphs()
      Glyphs info data
    • glyphs

      public Font glyphs(GlyphInfo value)
      Glyphs info data