From d4e368a1d1d9b7bcc4412c781ce787b39d6c313e Mon Sep 17 00:00:00 2001 From: jim Date: Sun, 16 Oct 2022 10:48:52 -0700 Subject: [PATCH] increase the height FreeType uses to draw glyphs in order to preserve precision of very fine features when converted to FC wires. scale the result back down appropriately. --- src/Mod/Part/App/FT2FC.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/App/FT2FC.cpp b/src/Mod/Part/App/FT2FC.cpp index 2eb86de428..54d25c24ba 100644 --- a/src/Mod/Part/App/FT2FC.cpp +++ b/src/Mod/Part/App/FT2FC.cpp @@ -155,7 +155,7 @@ PyObject* FT2FC(const Py_UNICODE *PyUString, // This sets size to 48 point. Magic. error = FT_Set_Char_Size(FTFont, 0, /* char_width in 1/64th of points */ - 48*64, /* char_height in 1/64th of points */ + 480*64, /* char_height in 1/64th of points */ 0, /* horizontal device resolution */ 0 ); /* vertical device resolution */ if (error) { @@ -163,7 +163,7 @@ PyObject* FT2FC(const Py_UNICODE *PyUString, throw std::runtime_error(ErrorMsg.str()); } - scalefactor = stringheight/float(FTFont->height); + scalefactor = (stringheight/float(FTFont->height))/10; for (i=0; i