mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- added a kerning option to FONTDEFS
# Conflicts: # src/gamedata/fonts/v_font.cpp
This commit is contained in:
parent
d2d637f431
commit
bfe3d251f9
2 changed files with 10 additions and 0 deletions
|
@ -2178,6 +2178,7 @@ void V_InitCustomFonts()
|
|||
int first;
|
||||
int count;
|
||||
int spacewidth;
|
||||
int kerning;
|
||||
char cursor = '_';
|
||||
|
||||
while ((llump = Wads.FindLump ("FONTDEFS", &lastlump)) != -1)
|
||||
|
@ -2194,6 +2195,7 @@ void V_InitCustomFonts()
|
|||
first = 33;
|
||||
count = 223;
|
||||
spacewidth = -1;
|
||||
kerning = 0;
|
||||
|
||||
sc.MustGetStringName ("{");
|
||||
while (!sc.CheckString ("}"))
|
||||
|
@ -2253,6 +2255,11 @@ void V_InitCustomFonts()
|
|||
}
|
||||
format = 2;
|
||||
}
|
||||
else if (sc.Compare("KERNING"))
|
||||
{
|
||||
sc.MustGetNumber();
|
||||
kerning = sc.Number;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (format == 1) goto wrong;
|
||||
|
@ -2275,6 +2282,7 @@ void V_InitCustomFonts()
|
|||
{
|
||||
FFont *fnt = new FFont (namebuffer, templatebuf, first, count, start, llump, spacewidth, donttranslate);
|
||||
fnt->SetCursor(cursor);
|
||||
fnt->SetKerning(kerning);
|
||||
}
|
||||
else if (format == 2)
|
||||
{
|
||||
|
@ -2298,6 +2306,7 @@ void V_InitCustomFonts()
|
|||
{
|
||||
FFont *fnt = new FSpecialFont (namebuffer, first, count, &lumplist[first], notranslate, llump, donttranslate);
|
||||
fnt->SetCursor(cursor);
|
||||
fnt->SetKerning(kerning);
|
||||
}
|
||||
}
|
||||
else goto wrong;
|
||||
|
|
|
@ -104,6 +104,7 @@ public:
|
|||
int GetCharCode(int code, bool needpic) const;
|
||||
char GetCursor() const { return Cursor; }
|
||||
void SetCursor(char c) { Cursor = c; }
|
||||
void SetKerning(int c) { GlobalKerning = c; }
|
||||
bool NoTranslate() const { return noTranslate; }
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue