This commit is contained in:
madrocketsci committed 2025-06-12 19:54:31 -04:00
1 parent 5c9f70268a
commit 422307e0bc
11 files changed
+5518 -22

No files matched your search

+30 -20
View File
@@ -20,33 +20,40 @@ namespace ams
namespace font4
{
static const int fontconverter4_success = 1;
static const int fontconverter4_failure = -1;
//Class intended to open and load a single freetype font-face (single file)
//Loads glyphs and glyph metrics from .ttf and .otf files using the Freetype library.
class freetype_fontfaceloader
{
public:
freetype_fontfaceloader();
~freetype_fontfaceloader();
//Class intended to open and load a single freetype font-face (single file)
//Loads glyphs and glyph metrics from .ttf and .otf files using the Freetype library.
class freetype_fontfaceloader
{
public:
freetype_fontfaceloader();
~freetype_fontfaceloader();
bool bopen; //is fontface file open?
bool blibinit; //is the freetype library initialized?
bool bopen; //is fontface file open?
bool blibinit; //is the freetype library initialized?
FT_Library library;
FT_Face face;
FT_Library library;
FT_Face face;
//
int open(const char *fontfilename);
void close();
//
int open(const char *fontfilename);
void close();
bool hasglyph(uint32_t charind);
int getglyph(uint32_t charind, int charheight, amsbitplane *glyph, amsglyphmetrics *glyphmetrics);
bool hasglyph(uint32_t charind);
int getglyph(uint32_t charind, int charheight, amsbitplane *glyph, amsglyphmetrics *glyphmetrics);
facemetrics getfacemetrics(int charheight);
//loads the set of glyphs into memory for the font-face
//performs no other calculations
//void load_amsface(uint32_t charindmin, uint32_t charindmax, int targetcharheight, amsfontface *fface);
};
int load_glyphrange(
int charheight,
uint32_t charindmin,
uint32_t charindmax,
amsglyphrange *glyphrange_out
);
};
@@ -56,6 +63,9 @@ class freetype_fontfaceloader
void test_printglyph(amsbitplane *glyph);
void test_getglyph1();
void test_getglyph2();
void test_facemetrics();
void test_glyphrange_load();
};
};