Some font adjustments to make it denser vertically

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
Christophe de Dinechin 2022-11-06 15:45:45 +01:00
parent 3f71099129
commit f028e690c6
6 changed files with 7668 additions and 7093 deletions

View file

@ -39,11 +39,11 @@ tools/ttf2fonts/ttf2fonts: tools/ttf2font/ttf2font.cpp tools/ttf2font/Makefile
#BASE_FONT=fonts/C43StandardFont.ttf
BASE_FONT=fonts/FogSans-ddd.ttf
fonts/EditorFont.cc: ttf2font $(BASE_FONT)
tools/ttf2font/ttf2font -s 48 EditorFont $(BASE_FONT) $@
tools/ttf2font/ttf2font -s 48 -S 80 EditorFont $(BASE_FONT) $@
fonts/StackFont.cc: ttf2font $(BASE_FONT)
tools/ttf2font/ttf2font -s 32 StackFont $(BASE_FONT) $@
tools/ttf2font/ttf2font -s 32 -S 80 StackFont $(BASE_FONT) $@
fonts/HelpFont.cc: ttf2font $(BASE_FONT)
tools/ttf2font/ttf2font -s 18 HelpFont $(BASE_FONT) $@
tools/ttf2font/ttf2font -s 18 -S 80 HelpFont $(BASE_FONT) $@
help/$(TARGET).md: $(wildcard doc/*.md doc/calc-help/*.md doc/commands/*.md)
cat $^ > $@

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -52,6 +52,7 @@ typedef std::vector<int> ints;
int verbose = 0;
int ascenderPct = 100;
int descenderPct = 100;
int heightPct = 100;
const char *getErrorMessage(FT_Error err)
@ -234,7 +235,7 @@ void processFont(cstring fontName,
uint denseHeight = SCALED(faceHeight) / pixelSize;
int scAscend = ascend * ascenderPct / 100;
int scDescend = descend * descenderPct / 100;
uint sparseHeight= SCALED(scAscend - scDescend) / pixelSize;
uint sparseHeight= SCALED(scAscend - scDescend) / pixelSize * heightPct/100;
int renderFlag = FT_LOAD_RENDER;
if (!threshold)
renderFlag |= FT_LOAD_TARGET_MONO;
@ -641,7 +642,7 @@ int main(int argc, char *argv[])
int opt;
int fontSize = 0;
int threshold = 0;
while ((opt = getopt(argc, argv, "a:hs:t:v")) != -1)
while ((opt = getopt(argc, argv, "a:d:hs:S:t:v")) != -1)
{
switch (opt)
{
@ -657,6 +658,9 @@ int main(int argc, char *argv[])
case 's':
fontSize = atoi(optarg);
break;
case 'S':
heightPct = atoi(optarg);
break;
case 't':
threshold = atoi(optarg);
break;