nodesnim/thirdparty/sdl2/ttf

    Dark Mode
Search:
Group by:

define SDL_TTF_MAJOR_VERSION 2 define SDL_TTF_MINOR_VERSION 0 define SDL_TTF_PATCHLEVEL 12define SDL_TTF_VERSION(X) define TTF_MAJOR_VERSION SDL_TTF_MAJOR_VERSION define TTF_MINOR_VERSION SDL_TTF_MINOR_VERSIONdefine TTF_VERSION(X) SDL_TTF_VERSION(X)define TTF_RenderText(font, text, fg, bg) define TTF_RenderUTF8(font, text, fg, bg) define TTF_RenderUNICODE(font, text, fg, bg)

Types

FontPtr {...}{.pure.} = ptr object

Procs

proc ttfLinkedVersion(): ptr SDL_Version {...}{.importc: "TTF_Linked_Version".}
proc ttfByteSwappedUnicode(swapped: cint) {...}{.importc: "TTF_ByteSwappedUNICODE".}
proc ttfInit(): SDL_Return {...}{.importc: "TTF_Init", discardable.}
proc openFont(file: cstring; ptsize: cint): FontPtr {...}{.importc: "TTF_OpenFont".}
proc openFontIndex(file: cstring; ptsize: cint; index: clong): FontPtr {...}{.
    importc: "TTF_OpenFontIndex".}
proc openFontRW(src: ptr RWops; freesrc: cint; ptsize: cint): FontPtr {...}{.
    importc: "TTF_OpenFontRW".}
proc openFontIndexRW(src: ptr RWops; freesrc: cint; ptsize: cint; index: clong): FontPtr {...}{.
    importc: "TTF_OpenFontIndexRW".}
proc getFontStyle(font: FontPtr): cint {...}{.importc: "TTF_GetFontStyle".}
proc setFontStyle(font: FontPtr; style: cint) {...}{.importc: "TTF_SetFontStyle".}
proc getFontOutline(font: FontPtr): cint {...}{.importc: "TTF_GetFontOutline".}
proc setFontOutline(font: FontPtr; outline: cint) {...}{.
    importc: "TTF_SetFontOutline".}
proc getFontHinting(font: FontPtr): cint {...}{.importc: "TTF_GetFontHinting".}
proc setFontHinting(font: FontPtr; hinting: cint) {...}{.
    importc: "TTF_SetFontHinting".}
proc fontHeight(font: FontPtr): cint {...}{.importc: "TTF_FontHeight".}
proc fontAscent(font: FontPtr): cint {...}{.importc: "TTF_FontAscent".}
proc fontDescent(font: FontPtr): cint {...}{.importc: "TTF_FontDescent".}
proc fontLineSkip(font: FontPtr): cint {...}{.importc: "TTF_FontLineSkip".}
proc getFontKerning(font: FontPtr): cint {...}{.importc: "TTF_GetFontKerning".}
proc setFontKerning(font: FontPtr; allowed: cint) {...}{.
    importc: "TTF_SetFontKerning".}
proc fontFaces(font: FontPtr): clong {...}{.importc: "TTF_FontFaces".}
proc fontFaceIsFixedWidth(font: FontPtr): cint {...}{.
    importc: "TTF_FontFaceIsFixedWidth".}
proc fontFaceFamilyName(font: FontPtr): cstring {...}{.
    importc: "TTF_FontFaceFamilyName".}
proc fontFaceStyleName(font: FontPtr): cstring {...}{.
    importc: "TTF_FontFaceStyleName".}
proc glyphIsProvided(font: FontPtr; ch: uint16): cint {...}{.
    importc: "TTF_GlyphIsProvided".}
proc glyphMetrics(font: FontPtr; ch: uint16; minx: ptr cint; maxx: ptr cint;
                  miny: ptr cint; maxy: ptr cint; advance: ptr cint): cint {...}{.
    importc: "TTF_GlyphMetrics".}
proc sizeText(font: FontPtr; text: cstring; w: ptr cint; h: ptr cint): cint {...}{.
    importc: "TTF_SizeText".}
proc sizeUtf8(font: FontPtr; text: cstring; w: ptr cint; h: ptr cint): cint {...}{.
    importc: "TTF_SizeUTF8".}
proc sizeUnicode(font: FontPtr; text: ptr uint16; w, h: ptr cint): cint {...}{.
    importc: "TTF_SizeUNICODE".}
proc renderTextSolid(font: FontPtr; text: cstring; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderText_Solid".}
proc renderUtf8Solid(font: FontPtr; text: cstring; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderUTF8_Solid".}
proc renderUnicodeSolid(font: FontPtr; text: ptr uint16; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderUNICODE_Solid".}
proc renderGlyphSolid(font: FontPtr; ch: uint16; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderGlyph_Solid".}
proc renderTextShaded(font: FontPtr; text: cstring; fg, bg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderText_Shaded".}
proc renderUtf8Shaded(font: FontPtr; text: cstring; fg, bg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderUTF8_Shaded".}
proc renderUnicodeShaded(font: FontPtr; text: ptr uint16; fg, bg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderUNICODE_Shaded".}
proc renderGlyphShaded(font: FontPtr; ch: uint16; fg, bg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderGlyph_Shaded".}
proc renderTextBlended(font: FontPtr; text: cstring; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderText_Blended".}
proc renderUtf8Blended(font: FontPtr; text: cstring; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderUTF8_Blended".}
proc renderUnicodeBlended(font: FontPtr; text: ptr uint16; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderUNICODE_Blended".}
proc renderTextBlendedWrapped(font: FontPtr; text: cstring; fg: Color;
                              wrapLength: uint32): SurfacePtr {...}{.
    importc: "TTF_RenderText_Blended_Wrapped".}
proc renderUtf8BlendedWrapped(font: FontPtr; text: cstring; fg: Color;
                              wrapLength: uint32): SurfacePtr {...}{.
    importc: "TTF_RenderUTF8_Blended_Wrapped".}
proc renderUnicodeBlendedWrapped(font: FontPtr; text: ptr uint16; fg: Color;
                                 wrapLength: uint32): SurfacePtr {...}{.
    importc: "TTF_RenderUNICODE_Blended_Wrapped".}
proc renderGlyphBlended(font: FontPtr; ch: uint16; fg: Color): SurfacePtr {...}{.
    importc: "TTF_RenderGlyph_Blended".}
proc close(font: FontPtr) {...}{.importc: "TTF_CloseFont".}
proc ttfQuit() {...}{.importc: "TTF_Quit".}
proc ttfWasInit(): bool {...}{.importc: "TTF_WasInit".}
proc getFontKerningSize(font: FontPtr; prev_index, indx: cint): cint {...}{.
    importc: "TTF_GetFontKerningSize".}
proc renderText(font: FontPtr; text: cstring; fg, bg: Color): SurfacePtr {...}{.
    raises: [], tags: [].}