Top Description Inners Fields Constructors Methods
org.lwjgl.nuklear

public Class NkFontConfig

extends Struct<NkFontConfig>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct nk_font_config
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Layout


struct nk_font_config {
    struct nk_font_config * next;
    void * ttf_blob;
    nk_size ttf_size;
    unsigned char ttf_data_owned_by_atlas;
    unsigned char merge_mode;
    unsigned char pixel_snap;
    unsigned char oversample_v;
    unsigned char oversample_h;
    unsigned char padding[3];
    float size;
    enum nk_font_coord_type coord_type;
    struct nk_vec2 spacing;
    nk_rune const * range;
    struct nk_baked_font * font;
    nk_rune fallback_glyph;
    struct nk_font_config * n;
    struct nk_font_config * p;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NkFontConfig.Buffer

An array of NkFontConfig structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
COORD_TYPE

The struct member offsets.

public static final int
FALLBACK_GLYPH

The struct member offsets.

public static final int
FONT

The struct member offsets.

public static final int
MERGE_MODE

The struct member offsets.

public static final int
N

The struct member offsets.

public static final int
NEXT

The struct member offsets.

public static final int
OVERSAMPLE_H

The struct member offsets.

public static final int
OVERSAMPLE_V

The struct member offsets.

public static final int
P

The struct member offsets.

public static final int
PADDING

The struct member offsets.

public static final int
PIXEL_SNAP

The struct member offsets.

public static final int
RANGE

The struct member offsets.

public static final int
SIZE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
SPACING

The struct member offsets.

public static final int
TTF_BLOB

The struct member offsets.

public static final int
TTF_DATA_OWNED_BY_ATLAS

The struct member offsets.

public static final int
TTF_SIZE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
NkFontConfig(long address, ByteBuffer container)

public
NkFontConfig(ByteBuffer container)

Creates a NkFontConfig instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static NkFontConfig
calloc()

Returns a new NkFontConfig instance allocated with memCalloc.

public static NkFontConfig.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new NkFontConfig.Buffer instance allocated with memCalloc.

public static NkFontConfig
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkFontConfig instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static NkFontConfig.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NkFontConfig.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public int
coord_type()

texture coordinate format with either pixel or UV coordinates

public NkFontConfig
coord_type(int value)

Sets the specified value to the coord_type field.

protected NkFontConfig
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static NkFontConfig
create()

Returns a new NkFontConfig instance allocated with BufferUtils.

public static NkFontConfig
create(long address)

Returns a new NkFontConfig instance for the specified memory address.

public static NkFontConfig.Buffer
create(int
the buffer capacity
capacity
)

Returns a new NkFontConfig.Buffer instance allocated with BufferUtils.

public static NkFontConfig.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a NkFontConfig.Buffer instance at the specified memory.

public static NkFontConfig
createSafe(long address)

Like create, but returns null if address is NULL.

public static NkFontConfig.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
fallback_glyph()

fallback glyph to use if a given rune is not found

public NkFontConfig
fallback_glyph(int value)

Sets the specified value to the fallback_glyph field.

public NkBakedFont
font()

font to setup in the baking process

public NkFontConfig
font(NkBakedFont value)

Sets the address of the specified NkBakedFont to the font field.

public static NkFontConfig
malloc()

Returns a new NkFontConfig instance allocated with memAlloc.

public static NkFontConfig.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new NkFontConfig.Buffer instance allocated with memAlloc.

public static NkFontConfig
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkFontConfig instance allocated on the specified MemoryStack.

public static NkFontConfig.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new NkFontConfig.Buffer instance allocated on the specified MemoryStack.

public boolean
merge_mode()

merges this font into the last font

public NkFontConfig
merge_mode(boolean value)

Sets the specified value to the merge_mode field.

public NkFontConfig

Returns:

a NkFontConfig view of the struct pointed to by the n field.
n
()

public NkFontConfig
n(NkFontConfig value)

Sets the address of the specified NkFontConfig to the n field.

public static int
ncoord_type(long struct)

Unsafe version of coord_type.

public static void
ncoord_type(long struct, int value)

Unsafe version of coord_type.

public NkFontConfig
next()

Note

only used internally

public NkFontConfig
next(NkFontConfig value)

Sets the address of the specified NkFontConfig to the next field.

public static int
nfallback_glyph(long struct)

Unsafe version of fallback_glyph.

public static void
nfallback_glyph(long struct, int value)

Unsafe version of fallback_glyph.

public static NkBakedFont
nfont(long struct)

Unsafe version of font.

public static void
nfont(long struct, NkBakedFont value)

Unsafe version of font.

public static boolean
nmerge_mode(long struct)

Unsafe version of merge_mode.

public static void
nmerge_mode(long struct, boolean value)

Unsafe version of merge_mode.

public static NkFontConfig
nn(long struct)

Unsafe version of n.

public static void
nn(long struct, NkFontConfig value)

Unsafe version of n.

public static NkFontConfig
nnext(long struct)

Unsafe version of next.

public static void
nnext(long struct, NkFontConfig value)

Unsafe version of next.

public static boolean
noversample_h(long struct)

Unsafe version of oversample_h.

public static void
noversample_h(long struct, boolean value)

Unsafe version of oversample_h.

public static boolean
noversample_v(long struct)

Unsafe version of oversample_v.

public static void
noversample_v(long struct, boolean value)

Unsafe version of oversample_v.

public static NkFontConfig
np(long struct)

Unsafe version of p.

public static void
np(long struct, NkFontConfig value)

Unsafe version of p.

public static ByteBuffer
npadding(long struct)

Unsafe version of padding.

public static byte
npadding(long struct, int index)

Unsafe version of padding.

public static void
npadding(long struct, ByteBuffer value)

Unsafe version of padding.

public static void
npadding(long struct, int index, byte value)

Unsafe version of padding.

public static boolean
npixel_snap(long struct)

Unsafe version of pixel_snap.

public static void
npixel_snap(long struct, boolean value)

Unsafe version of pixel_snap.

public static IntBuffer
nrange(long struct, int capacity)

Unsafe version of range.

public static void
nrange(long struct, IntBuffer value)

Unsafe version of range.

public static float
nsize(long struct)

Unsafe version of size.

public static void
nsize(long struct, float value)

Unsafe version of size.

public static NkVec2
nspacing(long struct)

Unsafe version of spacing.

public static void
nspacing(long struct, NkVec2 value)

Unsafe version of spacing.

public static ByteBuffer
nttf_blob(long struct)

Unsafe version of ttf_blob.

public static void
nttf_blob(long struct, ByteBuffer value)

Unsafe version of ttf_blob.

public static boolean
nttf_data_owned_by_atlas(long struct)

Unsafe version of ttf_data_owned_by_atlas.

public static void
nttf_data_owned_by_atlas(long struct, boolean value)

Unsafe version of ttf_data_owned_by_atlas.

public static long
nttf_size(long struct)

Unsafe version of ttf_size.

public static void
nttf_size(long struct, long value)

Sets the specified value to the ttf_size field of the specified struct.

public boolean
oversample_h()

rasterize at high quality for sub-pixel position

public NkFontConfig
oversample_h(boolean value)

Sets the specified value to the oversample_h field.

public boolean
oversample_v()

rasterize at high quality for sub-pixel position

public NkFontConfig
oversample_v(boolean value)

Sets the specified value to the oversample_v field.

public NkFontConfig

Returns:

a NkFontConfig view of the struct pointed to by the p field.
p
()

public NkFontConfig
p(NkFontConfig value)

Sets the address of the specified NkFontConfig to the p field.

public ByteBuffer
padding()

rasterize at high quality for sub-pixel position

public byte
padding(int index)

rasterize at high quality for sub-pixel position

public NkFontConfig
padding(ByteBuffer value)

Copies the specified ByteBuffer to the padding field.

public NkFontConfig
padding(int index, byte value)

Sets the specified value at the specified index of the padding field.

public boolean
pixel_snap()

align every character to pixel boundary (if true set oversample (1,1))

public NkFontConfig
pixel_snap(boolean value)

Sets the specified value to the pixel_snap field.

public IntBuffer

Returns:

list of unicode ranges (2 values per range, zero terminated)
range
(int
the number of elements in the returned buffer
capacity
)

public NkFontConfig
range(IntBuffer value)

Sets the address of the specified IntBuffer to the range field.

public NkFontConfig
set(NkFontConfig next, ByteBuffer ttf_blob, long ttf_size, boolean ttf_data_owned_by_atlas, boolean merge_mode, boolean pixel_snap, boolean oversample_v, boolean oversample_h, ByteBuffer padding, float size, int coord_type, NkVec2 spacing, IntBuffer range, NkBakedFont font, int fallback_glyph, NkFontConfig n, NkFontConfig p)

Initializes this struct with the specified values.

public NkFontConfig

Returns:

this struct
set
(NkFontConfig
the source struct
src
)

Copies the specified struct data to this struct.

public float
size()

baked pixel height of the font

public NkFontConfig
size(float value)

Sets the specified value to the size field.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public NkVec2
spacing()

extra pixel spacing between glyphs

public NkFontConfig
spacing(NkVec2 value)

Copies the specified NkVec2 to the spacing field.

public NkFontConfig
spacing(Consumer<NkVec2> consumer)

Passes the spacing field to the specified Consumer.

public ByteBuffer
ttf_blob()

pointer to loaded TTF file memory block

public NkFontConfig
ttf_blob(ByteBuffer value)

Sets the address of the specified ByteBuffer to the ttf_blob field.

public boolean
ttf_data_owned_by_atlas()

used inside font atlas: default to: 0

public NkFontConfig
ttf_data_owned_by_atlas(boolean value)

Sets the specified value to the ttf_data_owned_by_atlas field.

public long
ttf_size()

size of the loaded TTF file memory block

public NkFontConfig
ttf_size(long value)

Sets the specified value to the ttf_size field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate