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 record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final StructLayout
static final StructLayout
static final AddressLayout
static final StructLayout
static final StructLayout
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final StructLayout
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final StructLayout
static final ValueLayout.OfInt
static final AddressLayout
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSTBTT_Fontinfo
(@NotNull MemorySegment segment) Creates an instance of aSTBTT_Fontinfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTT_Fontinfo
static STBTT_Fontinfo.Ptr
@NotNull STBTT_Buf
cff()
@NotNull STBTT_Buf
charstrings
(@NotNull STBTT_Buf value) charstrings
(Consumer<@NotNull STBTT_Buf> consumer) static STBTT_Fontinfo
clone
(Arena arena, STBTT_Fontinfo src) @Nullable BytePtr
data()
Note: the returnedBytePtr
does not have correctBytePtr.size()
property.@NotNull MemorySegment
dataRaw()
void
dataRaw
(@NotNull MemorySegment value) final boolean
Indicates whether some other object is "equal to" this one.@NotNull STBTT_Buf
fdselect()
@NotNull STBTT_Buf
int
fontstart
(int value) int
glyf()
glyf
(int value) int
gpos()
gpos
(int value) @NotNull STBTT_Buf
gsubrs()
final int
hashCode()
Returns a hash code value for this object.int
head()
head
(int value) int
hhea()
hhea
(int value) int
hmtx()
hmtx
(int value) int
indexMap()
indexMap
(int value) int
indextolocformat
(int value) int
kern()
kern
(int value) int
loca()
loca
(int value) int
numglyphs
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.@NotNull STBTT_Buf
subrs()
int
svg()
svg
(int value) final String
toString()
Returns a string representation of this record class.@NotNull MemorySegment
userdata()
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_Fontinfo
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
userdata
-
userdata
-
userdata
-
data
Note: the returnedBytePtr
does 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 thesegment
record component.
-