Refactor SpriteFont struct

Now it uses CharInfo data, this way, it's better aligned with the future
RRES file format data layout for sprite font characters.
This commit is contained in:
raysan5 2017-02-05 02:59:39 +01:00
parent a08117155d
commit 1a879ba08e
10 changed files with 164 additions and 144 deletions

View file

@ -45,10 +45,10 @@ int main()
ClearBackground(RAYWHITE);
DrawText("Font name: PixAntiqua", 40, 50, 20, GRAY);
DrawText(FormatText("Font base size: %i", font.size), 40, 80, 20, GRAY);
DrawText(FormatText("Font chars number: %i", font.numChars), 40, 110, 20, GRAY);
DrawText(FormatText("Font base size: %i", font.baseSize), 40, 80, 20, GRAY);
DrawText(FormatText("Font chars number: %i", font.charsCount), 40, 110, 20, GRAY);
DrawTextEx(font, msg, (Vector2){ 40, 180 }, font.size, 0, MAROON);
DrawTextEx(font, msg, (Vector2){ 40, 180 }, font.baseSize, 0, MAROON);
EndDrawing();
//----------------------------------------------------------------------------------