FreeTypeGL.kl

Types

FreeTypeAtlas (object)

バージョン 2.4.0 で追加.

FreeTypeGL extension wraps the C++ freeType-gl library in KL to draw in OpenGL 2D primitives such as text or lines. https://github.com/rougier/freetype-gl

Because the FreeTypeGL extension can be used with any OpenGL version/implementation, it doesn’t expose freeType-gl high level api. Indeed, freeType-gl relies on OpenGL 1.2, and the managment of the OpenGL buffers (insertion/push) is limited. Instead, the FreeTypeGL extension exposes the low level methods, and OpenGL calls (such as buffer binding) are left to specialized classes. See BaseTextGL, BaseAtlasGL for a complete examples.

Members

String fontPath Path of the used font.
String glyphs List of glyphs character.

Methods

  FreeTypeAtlas ( in FreeTypeAtlas other )
  FreeTypeAtlas ()
  clear ! ()
FreeTypeAtlas clone ? ()
  createAtlas ! ( in UInt32 width, in UInt32 height )
  createFont ! ( in Float32 size, in String path )
  createGlyphs ! ( in String glyphs )
Boolean fontIsValid ? ()
  getData ? ( io Data data )
  getDimensions ? ( io UInt32 width, io UInt32 height )
String getFontPath ? ()
Float32 getFontSize ? ()
Float32 getGlyphAdvance ? ( in String glyph )
Boolean getGlyphAttributes ? ( in String current, in String previous, io Float32 kerning, io Float32 advance, io Float32 ox, io Float32 oy, io Float32 width, io Float32 height, io Float32 s0, io Float32 s1, io Float32 t0, io Float32 t1 )
  getGlyphDimension ? ( in String glyph, io Float32 oX, io Float32 oY, io Float32 width, io Float32 height )
Float32 getGlyphKerning ? ( in String current, in String previous )
  getGlyphTextureIndices ? ( in String glyph, io Float32 s0, io Float32 s1, io Float32 t0, io Float32 t1 )
String getGlyphs ? ()
UInt32 getTextureID ? ()
  init ! ()
Boolean isValid ? ()
  setTextureID ! ( in UInt32 id )
  ~FreeTypeAtlas ()

FreeTypeGL (object)

Members

UInt32 indexSize Size of the index.
UInt32 vertexSize Size of the vertex.
UInt32 maxVerticesCount Number max of vertices per element.
UInt32 elementCount Number of element to draw.

Methods

  FreeTypeGL ( in FreeTypeGL other )
  FreeTypeGL ()
  allocAndSetVerticesSize ! ( in UInt32 elementCount, in UInt32 maxVerticesCount )
  allocVertices ! ( in UInt32 elementCount, in UInt32 maxVerticesCount )
  clearVertices ! ()
FreeTypeGL clone ? ()
  createVertices ! ( in String attributes, in UInt32 mode, in UInt32 vertexSize, in UInt32 indexSize )
  delete ! ()
SInt32 getAttributeIndex ? ( in UInt32 index )
  getAttributeName ? ( in UInt32 index, io String name )
  getAttributePointer ? ( in UInt32 index, io Data data )
UInt32 getAttributeSize ? ( in UInt32 index )
UInt32 getAttributeStride ? ( in UInt32 index )
UInt32 getAttributeType ? ( in UInt32 index )
UInt32 getElementCount ? ()
UInt32 getGPUISize ? ()
UInt32 getGPUVSize ? ()
UInt32 getIndexSize ? ()
  getIndicesData ? ( io Data data )
UInt32 getIndicesID ? ()
UInt32 getMaxVerticesCount ? ()
UInt32 getMode ? ()
UInt32 getNumberIndices ? ()
UInt32 getNumberIndicesItems ? ()
UInt32 getNumberVertices ? ()
UInt32 getNumberVerticesItems ? ()
UInt32 getState ? ()
UInt32 getVertexSize ? ()
  getVerticesData ? ( io Data data )
UInt32 getVerticesID ? ()
  init ! ()
  insertVerticesList ! ( in UInt32 index, in UInt32 verticesCount, in Data vertices, in Data indices )
Boolean isAttributeNormalized ? ( in UInt32 index )
  pushVertices ! ( in Data vertices, in Data indices )
  pushVerticesList ! ( in UInt32 verticesCount, in Data vertices, in Data indices )
  setAttributeIndex ! ( in UInt32 index, in SInt32 attrIndex )
  setGPUISize ! ( in UInt32 size )
  setGPUVSize ! ( in UInt32 size )
  setIndicesID ! ( in UInt32 id )
  setMode ! ( in UInt32 mode )
  setState ! ( in UInt32 state )
  setVerticesID ! ( in UInt32 id )
  ~FreeTypeGL ()