Create a font from your PNG JSON pairing in the directory.
Allows you to disable shadow coloring for a teeny tiny bit of performance when you're doing cool custom shadow coloring!
Turns on shadowing.
Flushes out the cache, gives you back a font struct containing the raw data
Allows you to index the current amount of characters on the canvas. This does not include spaces and carriage returns. You MUST call renderToCanvas before calling this otherwise this will always be 0 when you call it.
Allows you to extract the current font PNG file location automatically
Allows you to get the max amount of characters allowed in canvas
Processes your input string, then sends you how long it would be when rendering. Helpful for repositioning your "cursor" in the texture cache!
Processes your input text string with shadows to see how long it would be when rendering. Helpful for positioning your "cursor" in the texture cache!
Allows you to get text size to do interesting things. Returns as RazorTextSize struct
Allows you to manually move around characters.
Automatically flushes out the cache, handing the data structure off to the delegate function you defined via setRenderFunc()
Render to the canvas. Remember: You must run flush() to collect this canvas. If rounding is enabled, it will attempt to keep your text aligned with the pixels on screen to avoid wavy/blurry/jagged text. This will automatically render shadows for you as well.
Rotate a character around the centerpoint of it's face.
Selects and caches the font of your choosing.
Allows you to render to a canvas using top left as a base position
Allows you to set individual character colors
Allows you to directly work on vertex position colors in a character. Using direct points (verbose)
Allows you to directly work on vertex position colors in a character. Using direct points (tidy). double vec is [R,G,B,A]
Allows you to blanket a range of characters in the canvas with a color.
Allows automatic render target (OpenGL, Vulkan, Metal, DX) DIRECT rendering via RazorFont. You can simply call render() on the library and it will automatically do whatever you tell it to with this delegate function. This will also automatically run flush().
Allows automatic render target (OpenGL, Vulkan, Metal, DX) DIRECT instantiation. This allows the render engine to AUTOMATICALLY upload the image as RAW data. ubyte[] = raw data. int = width. int = height.
Allows automatic render target (OpenGL, Vulkan, Metal, DX) passthrough instantiation. This can basically pass a file location off to your rendering engine and auto load it into memory.
Allows you to set the offet of the text shadowing.
Allows you to blanket set the color for the entire canvas.
Allows you to blanket set the shadow color for the entire canvas after the current character.
A simple struct to get the font data for the shader
A simple struct to get the width and height of rendered text
The Sharpest Font Library For D Game Development