Interface FontGetGlyphKerningFunc
- All Superinterfaces:
FunctionPointer
- All Known Subinterfaces:
FontGetGlyphHKerningFunc, FontGetGlyphVKerningFunc
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("org.javagi.JavaGI")
public interface FontGetGlyphKerningFunc
extends FunctionPointer
Functional interface declaration of the FontGetGlyphKerningFunc callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionrun(Font font, @Nullable MemorySegment fontData, Codepoint firstGlyph, Codepoint secondGlyph) This method should retrieve the kerning-adjustment value for a glyph-pair in the specified font, for horizontal text segments.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, MemorySegment, int, int, MemorySegment)method.default intupcall(MemorySegment font, MemorySegment fontData, int firstGlyph, int secondGlyph, MemorySegment userData) Theupcallmethod is called from native code.
-
Method Details
-
run
Position run(Font font, @Nullable MemorySegment fontData, Codepoint firstGlyph, Codepoint secondGlyph) This method should retrieve the kerning-adjustment value for a glyph-pair in the specified font, for horizontal text segments.- Parameters:
font-hb_font_tto work uponfontData-fontuser data pointerfirstGlyph- The glyph ID of the first glyph in the glyph pairsecondGlyph- The glyph ID of the second glyph in the glyph pair
-
upcall
default int upcall(MemorySegment font, MemorySegment fontData, int firstGlyph, int secondGlyph, MemorySegment userData) Theupcallmethod is called from native code. The parameters are marshaled andrun(Font, MemorySegment, Codepoint, Codepoint)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, MemorySegment, int, int, MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-