APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.font

public Class HBShaper

extends Object
Class Inheritance
Imports
java.awt.geom.Point2D, sun.font.GlyphLayout.GVData, sun.java2d.Disposer, .DisposerRecord, java.lang.foreign.Arena, .FunctionDescriptor, .Linker, .MemoryLayout, .MemorySegment, .SequenceLayout, .StructLayout, .SymbolLookup, .UnionLayout, java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, .VarHandle, java.util.Optional, .WeakHashMap

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
pack-priv static record

Field Summary

Modifier and TypeField and Description
private static final VarHandle
private static final VarHandle
private static final MethodHandle
private static final MethodHandle
private static final WeakHashMap<Font2D, HBShaper.FaceRef>
private static final MemorySegment
private static final MemorySegment
private static final MemorySegment
private static final MemorySegment
private static final MemorySegment
private static final MemorySegment
private static final StructLayout
GlyphInfoLayout

struct hb_glyph_info_t { hb_codepoint_t codepoint; hb_mask_t mask; uint32_t cluster; hb_var_int_t var1; hb_var_int_t var2; };

private static final MemorySegment
private static final float
private static final MethodHandle
private static final Linker
private static final MethodHandle
private static final MethodHandles.Lookup
private static final StructLayout
pack-priv static final ScopedValue<HBShaper.ScopedVars>
private static final MemorySegment
private static final SymbolLookup
private static final UnionLayout
private static final VarHandle
private static final VarHandle
private static final VarHandle
private static final VarHandle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static int
get_glyph_contour_point(MemorySegment font_ptr, MemorySegment font_data, int glyph, int point_index, MemorySegment x_ptr, MemorySegment y_ptr, MemorySegment user_data)

private static int
get_glyph_h_advance(MemorySegment font_ptr, MemorySegment font_data, int glyph, MemorySegment user_data)

private static int
get_glyph_v_advance(MemorySegment font_ptr, MemorySegment font_data, int glyph, MemorySegment user_data)

private static int
get_nominal_glyph(MemorySegment font_ptr, MemorySegment font_data, int unicode, MemorySegment glyph, MemorySegment user_data)

private static int
get_variation_glyph(MemorySegment font_ptr, MemorySegment font_data, int unicode, int variation_selector, MemorySegment glyph, MemorySegment user_data)

pack-priv static MemorySegment
getFace(Font2D font2D)

private static int
getFontTableData(int tag, MemorySegment data_ptr_out)

private static FunctionDescriptor
private static MethodHandle
private static MemorySegment
getUpcallStub(Arena arena, String mName, MemoryLayout retType, MemoryLayout... argTypes)

private static VarHandle
private static final int
HBFloatToFixed(float f)

pack-priv static void
shape(Font2D font2D, FontStrike fontStrike, float[] mat, MemorySegment hbface, char[] text, GlyphLayout.GVData gvData, int script, int offset, int limit, int baseIndex, Point2D.Float startPt, int flags, int slot)

private static void
store_layout_results(int slot, int baseIndex, int offset, float startX, float startY, int charCount, int glyphCount, MemorySegment glyphInfo, MemorySegment glyphPos)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clusterHandleback to summary
private static final VarHandle clusterHandle
codePointHandleback to summary
private static final VarHandle codePointHandle
create_face_handleback to summary
private static final MethodHandle create_face_handle
dispose_face_handleback to summary
private static final MethodHandle dispose_face_handle
faceMapback to summary
private static final WeakHashMap<Font2D, HBShaper.FaceRef> faceMap
get_contour_pt_stubback to summary
private static final MemorySegment get_contour_pt_stub
get_h_advance_stubback to summary
private static final MemorySegment get_h_advance_stub
get_nominal_glyph_stubback to summary
private static final MemorySegment get_nominal_glyph_stub
get_table_data_fn_stubback to summary
private static final MemorySegment get_table_data_fn_stub
get_v_advance_stubback to summary
private static final MemorySegment get_v_advance_stub
get_var_glyph_stubback to summary
private static final MemorySegment get_var_glyph_stub
GlyphInfoLayoutback to summary
private static final StructLayout GlyphInfoLayout

struct hb_glyph_info_t { hb_codepoint_t codepoint; hb_mask_t mask; uint32_t cluster; hb_var_int_t var1; hb_var_int_t var2; };

hb_jdk_font_funcs_structback to summary
private static final MemorySegment hb_jdk_font_funcs_struct
HBFloatToFixedScaleback to summary
private static final float HBFloatToFixedScale
jdk_hb_shape_handleback to summary
private static final MethodHandle jdk_hb_shape_handle
LINKERback to summary
private static final Linker LINKER
malloc_handleback to summary
private static final MethodHandle malloc_handle
MH_LOOKUPback to summary
private static final MethodHandles.Lookup MH_LOOKUP
PositionLayoutback to summary
private static final StructLayout PositionLayout
scopedVarsback to summary
pack-priv static final ScopedValue<HBShaper.ScopedVars> scopedVars
store_layout_results_stubback to summary
private static final MemorySegment store_layout_results_stub
SYM_LOOKUPback to summary
private static final SymbolLookup SYM_LOOKUP
VarIntLayoutback to summary
private static final UnionLayout VarIntLayout
x_advanceHandleback to summary
private static final VarHandle x_advanceHandle
x_offsetHandleback to summary
private static final VarHandle x_offsetHandle
y_advanceHandleback to summary
private static final VarHandle y_advanceHandle
y_offsetHandleback to summary
private static final VarHandle y_offsetHandle

Constructor Detail

HBShaperback to summary
public HBShaper()

Method Detail

get_glyph_contour_pointback to summary
private static int get_glyph_contour_point(MemorySegment font_ptr, MemorySegment font_data, int glyph, int point_index, MemorySegment x_ptr, MemorySegment y_ptr, MemorySegment user_data)
get_glyph_h_advanceback to summary
private static int get_glyph_h_advance(MemorySegment font_ptr, MemorySegment font_data, int glyph, MemorySegment user_data)
get_glyph_v_advanceback to summary
private static int get_glyph_v_advance(MemorySegment font_ptr, MemorySegment font_data, int glyph, MemorySegment user_data)
get_nominal_glyphback to summary
private static int get_nominal_glyph(MemorySegment font_ptr, MemorySegment font_data, int unicode, MemorySegment glyph, MemorySegment user_data)
get_variation_glyphback to summary
private static int get_variation_glyph(MemorySegment font_ptr, MemorySegment font_data, int unicode, int variation_selector, MemorySegment glyph, MemorySegment user_data)
getFaceback to summary
pack-priv static MemorySegment getFace(Font2D font2D)
getFontTableDataback to summary
private static int getFontTableData(int tag, MemorySegment data_ptr_out)
getFunctionDescriptorback to summary
private static FunctionDescriptor getFunctionDescriptor(MemoryLayout retType, MemoryLayout... argTypes)
getMethodHandleback to summary
private static MethodHandle getMethodHandle(String mName, FunctionDescriptor fd)
getUpcallStubback to summary
private static MemorySegment getUpcallStub(Arena arena, String mName, MemoryLayout retType, MemoryLayout... argTypes)
Annotations
@SuppressWarnings:restricted
getVarHandleback to summary
private static VarHandle getVarHandle(StructLayout struct, String name)
HBFloatToFixedback to summary
private static final int HBFloatToFixed(float f)
shapeback to summary
pack-priv static void shape(Font2D font2D, FontStrike fontStrike, float[] mat, MemorySegment hbface, char[] text, GlyphLayout.GVData gvData, int script, int offset, int limit, int baseIndex, Point2D.Float startPt, int flags, int slot)
store_layout_resultsback to summary
private static void store_layout_results(int slot, int baseIndex, int offset, float startX, float startY, int charCount, int glyphCount, MemorySegment glyphInfo, MemorySegment glyphPos)
sun.font back to summary

private Class HBShaper.FaceRef

extends Object
implements DisposerRecord
Class Inheritance
All Implemented Interfaces
sun.java2d.DisposerRecord

Field Summary

Modifier and TypeField and Description
private MemorySegment
private Font2D

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
public void
private synchronized MemorySegment
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

faceback to summary
private MemorySegment face
font2Dback to summary
private Font2D font2D

Constructor Detail

FaceRefback to summary
private FaceRef(Font2D font)

Method Detail

createFaceback to summary
private void createFace()
disposeback to summary
public void dispose()

Implements sun.java2d.DisposerRecord.dispose.

Annotations
@Override
getFaceback to summary
private synchronized MemorySegment getFace()
sun.font back to summary

private Class HBShaper.IntPtr

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv MemorySegment

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
set(int i)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

segback to summary
pack-priv MemorySegment seg

Constructor Detail

IntPtrback to summary
pack-priv IntPtr(MemorySegment seg)
Annotations
@SuppressWarnings:restricted

Method Detail

setback to summary
pack-priv void set(int i)
sun.font back to summary

pack-priv final Record HBShaper.ScopedVars

extends Record
Class Inheritance
Record Components
font:Font2D 
fontStrike:FontStrike 
gvData:GlyphLayout.GVData 
point:Point2D.Float 

Field Summary

Modifier and TypeField and Description
private final Font2D
font

Record Component accessed by font().

private final FontStrike
fontStrike

Record Component accessed by fontStrike().

private final GlyphLayout.GVData
gvData

Record Component accessed by gvData().

private final Point2D.Float
point

Record Component accessed by point().

Constructor Summary

AccessConstructor and Description
pack-priv
ScopedVars(Font2D font, FontStrike fontStrike, GlyphLayout.GVData gvData, Point2D.Float point)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public Font2D
font()

Record Component getter of font.

public FontStrike
fontStrike()

Record Component getter of fontStrike.

public GlyphLayout.GVData
gvData()

Record Component getter of gvData.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public Point2D.Float
point()

Record Component getter of point.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

fontback to summary
private final Font2D font

Record Component accessed by font().

fontStrikeback to summary
private final FontStrike fontStrike

Record Component accessed by fontStrike().

gvDataback to summary
private final GlyphLayout.GVData gvData

Record Component accessed by gvData().

pointback to summary
private final Point2D.Float point

Record Component accessed by point().

Constructor Detail

ScopedVarsback to summary
pack-priv ScopedVars(Font2D font, FontStrike fontStrike, GlyphLayout.GVData gvData, Point2D.Float point)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
fontback to summary
public Font2D font()

Record Component getter of font.

fontStrikeback to summary
public FontStrike fontStrike()

Record Component getter of fontStrike.

gvDataback to summary
public GlyphLayout.GVData gvData()

Record Component getter of gvData.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

pointback to summary
public Point2D.Float point()

Record Component getter of point.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.