Record Class STBTT_Fontinfo
java.lang.Object
java.lang.Record
club.doki7.stb.truetype.datatype.STBTT_Fontinfo
- All Implemented Interfaces:
IPointer,ISTBTT_Fontinfo
@ValueBasedCandidate
@UnsafeConstructor
public record STBTT_Fontinfo(@NotNull MemorySegment segment)
extends Record
implements ISTBTT_Fontinfo
Represents a pointer to a stbtt_fontinfo structure in native memory.
Structure
typedef struct stbtt_fontinfo {
void* userdata;
char* data;
int fontstart;
int numglyphs;
int loca;
int head;
int glyf;
int hhea;
int hmtx;
int kern;
int gpos;
int svg;
int indexMap;
int indextolocformat;
stbtt__buf cff;
stbtt__buf charstrings;
stbtt__buf gsubrs;
stbtt__buf subrs;
stbtt__buf fontdicts;
stbtt__buf fdselect;
} stbtt_fontinfo;
Contracts
The property segment() should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to
LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java
null instead. See the documentation of IPointer.segment() for more details.
The constructor of this class is marked as UnsafeConstructor, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final AddressLayoutstatic final StructLayoutstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final StructLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSTBTT_Fontinfo(@NotNull MemorySegment segment) Creates an instance of aSTBTT_Fontinforecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTT_Fontinfostatic STBTT_Fontinfo.Ptr@NotNull STBTT_Bufcff()@NotNull STBTT_Bufcharstrings(@NotNull STBTT_Buf value) charstrings(Consumer<@NotNull STBTT_Buf> consumer) static STBTT_Fontinfoclone(Arena arena, STBTT_Fontinfo src) @Nullable BytePtrdata()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.@NotNull MemorySegmentdataRaw()voiddataRaw(@NotNull MemorySegment value) final booleanIndicates whether some other object is "equal to" this one.@NotNull STBTT_Buffdselect()@NotNull STBTT_Bufintfontstart(int value) intglyf()glyf(int value) intgpos()gpos(int value) @NotNull STBTT_Bufgsubrs()final inthashCode()Returns a hash code value for this object.inthead()head(int value) inthhea()hhea(int value) inthmtx()hmtx(int value) intindexMap()indexMap(int value) intindextolocformat(int value) intkern()kern(int value) intloca()loca(int value) intnumglyphs(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.@NotNull STBTT_Bufsubrs()intsvg()svg(int value) final StringtoString()Returns a string representation of this record class.@NotNull MemorySegmentuserdata()userdata(@NotNull MemorySegment value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$userdata
-
PATH$data
-
PATH$fontstart
-
PATH$numglyphs
-
PATH$loca
-
PATH$head
-
PATH$glyf
-
PATH$hhea
-
PATH$hmtx
-
PATH$kern
-
PATH$gpos
-
PATH$svg
-
PATH$indexMap
-
PATH$indextolocformat
-
PATH$cff
-
PATH$charstrings
-
PATH$gsubrs
-
PATH$subrs
-
PATH$fontdicts
-
PATH$fdselect
-
LAYOUT$userdata
-
LAYOUT$data
-
LAYOUT$fontstart
-
LAYOUT$numglyphs
-
LAYOUT$loca
-
LAYOUT$head
-
LAYOUT$glyf
-
LAYOUT$hhea
-
LAYOUT$hmtx
-
LAYOUT$kern
-
LAYOUT$gpos
-
LAYOUT$svg
-
LAYOUT$indexMap
-
LAYOUT$indextolocformat
-
LAYOUT$cff
-
LAYOUT$charstrings
-
LAYOUT$gsubrs
-
LAYOUT$subrs
-
LAYOUT$fontdicts
-
LAYOUT$fdselect
-
SIZE$userdata
public static final long SIZE$userdata -
SIZE$data
public static final long SIZE$data -
SIZE$fontstart
public static final long SIZE$fontstart -
SIZE$numglyphs
public static final long SIZE$numglyphs -
SIZE$loca
public static final long SIZE$loca -
SIZE$head
public static final long SIZE$head -
SIZE$glyf
public static final long SIZE$glyf -
SIZE$hhea
public static final long SIZE$hhea -
SIZE$hmtx
public static final long SIZE$hmtx -
SIZE$kern
public static final long SIZE$kern -
SIZE$gpos
public static final long SIZE$gpos -
SIZE$svg
public static final long SIZE$svg -
SIZE$indexMap
public static final long SIZE$indexMap -
SIZE$indextolocformat
public static final long SIZE$indextolocformat -
SIZE$cff
public static final long SIZE$cff -
SIZE$charstrings
public static final long SIZE$charstrings -
SIZE$gsubrs
public static final long SIZE$gsubrs -
SIZE$subrs
public static final long SIZE$subrs -
SIZE$fontdicts
public static final long SIZE$fontdicts -
SIZE$fdselect
public static final long SIZE$fdselect -
OFFSET$userdata
public static final long OFFSET$userdata -
OFFSET$data
public static final long OFFSET$data -
OFFSET$fontstart
public static final long OFFSET$fontstart -
OFFSET$numglyphs
public static final long OFFSET$numglyphs -
OFFSET$loca
public static final long OFFSET$loca -
OFFSET$head
public static final long OFFSET$head -
OFFSET$glyf
public static final long OFFSET$glyf -
OFFSET$hhea
public static final long OFFSET$hhea -
OFFSET$hmtx
public static final long OFFSET$hmtx -
OFFSET$kern
public static final long OFFSET$kern -
OFFSET$gpos
public static final long OFFSET$gpos -
OFFSET$svg
public static final long OFFSET$svg -
OFFSET$indexMap
public static final long OFFSET$indexMap -
OFFSET$indextolocformat
public static final long OFFSET$indextolocformat -
OFFSET$cff
public static final long OFFSET$cff -
OFFSET$charstrings
public static final long OFFSET$charstrings -
OFFSET$gsubrs
public static final long OFFSET$gsubrs -
OFFSET$subrs
public static final long OFFSET$subrs -
OFFSET$fontdicts
public static final long OFFSET$fontdicts -
OFFSET$fdselect
public static final long OFFSET$fdselect
-
-
Constructor Details
-
STBTT_Fontinfo
Creates an instance of aSTBTT_Fontinforecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
userdata
-
userdata
-
userdata
-
data
Note: the returnedBytePtrdoes not have correctBytePtr.size()property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)to set the size before actually reading from or writing to the buffer. -
data
-
dataRaw
-
dataRaw
-
fontstart
public int fontstart() -
fontstart
-
numglyphs
public int numglyphs() -
numglyphs
-
loca
public int loca() -
loca
-
head
public int head() -
head
-
glyf
public int glyf() -
glyf
-
hhea
public int hhea() -
hhea
-
hmtx
public int hmtx() -
hmtx
-
kern
public int kern() -
kern
-
gpos
public int gpos() -
gpos
-
svg
public int svg() -
svg
-
indexMap
public int indexMap() -
indexMap
-
indextolocformat
public int indextolocformat() -
indextolocformat
-
cff
-
cff
-
cff
-
charstrings
-
charstrings
-
charstrings
-
gsubrs
-
gsubrs
-
gsubrs
-
subrs
-
subrs
-
subrs
-
fontdicts
-
fontdicts
-
fontdicts
-
fdselect
-
fdselect
-
fdselect
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-