mirror of
https://github.com/c3d/DB48X-on-DM42.git
synced 2024-09-28 03:20:53 +02:00
Some font adjustments to make it denser vertically
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
parent
3f71099129
commit
f028e690c6
6 changed files with 7668 additions and 7093 deletions
6
Makefile
6
Makefile
|
@ -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 $^ > $@
|
||||
|
||||
|
|
8676
fonts/EditorFont.cc
8676
fonts/EditorFont.cc
File diff suppressed because it is too large
Load diff
Binary file not shown.
1814
fonts/HelpFont.cc
1814
fonts/HelpFont.cc
File diff suppressed because it is too large
Load diff
4257
fonts/StackFont.cc
4257
fonts/StackFont.cc
File diff suppressed because it is too large
Load diff
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue