From a2a6262ffeb10cf89aee706d20617703563be7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Wed, 25 Aug 2021 22:35:54 +0200 Subject: [PATCH] working on new font engine --- source/text.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/text.cpp b/source/text.cpp index 4736528..abae707 100644 --- a/source/text.cpp +++ b/source/text.cpp @@ -16,6 +16,12 @@ Text::~Text() mSprite = nullptr; } +// en el constructor se le pasa la ruta del fichero de descripcion +// el fichero tendra el alto y ancho del cuadrado donde esta cada letra +// y el listado de anchos de cada una +// el init ya no necesita type ni size + + // Inicializador void Text::init(Uint8 type, Uint8 size) { @@ -50,11 +56,12 @@ void Text::init(Uint8 type, Uint8 size) mOffset[int(text[i])].w = size; } - // Establece las coordenadas de forma manual para la ñ y la ç + // Establece las coordenadas de forma manual para la ñ mOffset[int('^')].x = mOffset[int('z')].x + size; mOffset[int('^')].y = mOffset[int('z')].y; mOffset[int('^')].w = size; + // Establece las coordenadas de forma manual para la ñç mOffset[int('~')].x = mOffset[int('z')].x + size * 2; mOffset[int('~')].y = mOffset[int('z')].y; mOffset[int('~')].w = size; @@ -114,7 +121,6 @@ void Text::init(Uint8 type, Uint8 size) mOffset[int('^')].w = 7; mOffset[int('~')].w = 7; - mOffset[int('a')].w = 7; mOffset[int('b')].w = 7; mOffset[int('c')].w = 6;