working on new font engine

This commit is contained in:
2021-08-25 22:35:54 +02:00
parent dbd22fa719
commit a2a6262ffe

View File

@@ -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;