JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OutlinedFont Class Reference

Same as jngl::Font but adds an outline. More...

#include <jngl/OutlinedFont.hpp>

Public Member Functions

 OutlinedFont (const std::string &filename, unsigned int size, float strokePercentage)
 Set strokePercentage to a positive value in %, e.g. 5 to add an outline of 5% to the font.
 
void print (const Mat3 &modelview, const std::string &text, jngl::Rgba innerColor, jngl::Rgba outerColor) const
 Print text using modelview in innerColor and an outline in outerColor.
 
double getTextWidth (std::string_view)
 Calculates the width of text in scale-independent pixels if it would be drawn with this font.
 

Detailed Description

Same as jngl::Font but adds an outline.

Definition at line 12 of file OutlinedFont.hpp.


The documentation for this class was generated from the following file: