Skip to content
GitLab
Explore
Sign in
Register
FreeType
FreeType
Compare revisions
3926f77efdef679d06c5018ede966c9bffcf62ed to 71f5924d257ca9a4407df1284c53df5f1abb3e0a
Commits on Source (2)
Debug options, to be reverted later
· ca850761
Anurag Thakur
authored
Aug 12, 2023
ca850761
Notes for implementation
· 71f5924d
Anurag Thakur
authored
Aug 12, 2023
71f5924d
Hide whitespace changes
Inline
Side-by-side
include/freetype/config/ftoption.h
View file @
71f5924d
...
...
@@ -430,8 +430,8 @@ FT_BEGIN_HEADER
* Do not `#undef` these macros here since the build system might define
* them for certain configurations only.
*/
/*
#define FT_DEBUG_LEVEL_ERROR
*/
/*
#define FT_DEBUG_LEVEL_TRACE
*/
#define FT_DEBUG_LEVEL_ERROR
#define FT_DEBUG_LEVEL_TRACE
/**************************************************************************
...
...
@@ -647,7 +647,7 @@ FT_BEGIN_HEADER
* Do not `#undef` this macro here, since the build system might define it
* for certain configurations only.
*/
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
//
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/**************************************************************************
...
...
@@ -681,7 +681,7 @@ FT_BEGIN_HEADER
* [1]
* https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
*/
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
//
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
/**************************************************************************
...
...
modules.cfg
View file @
71f5924d
...
...
@@ -38,7 +38,7 @@ FONT_MODULES += truetype
# TrueType
preload font driver.
#
#
This driver needs the `sfnt' module.
FONT_MODULES
+= preload
#
FONT_MODULES
+= preload
# PostScript
Type 1 font driver.
#
...
...
src/base/ftobjs.c
View file @
71f5924d
...
...
@@ -2636,6 +2636,7 @@
driver
=
FT_DRIVER
(
cur
[
0
]
);
// TODO: Check the args for a "preload" flag and act accordingly
if
(
args
->
flags
&
FT_OPEN_PARAMS
)
{
num_params
=
args
->
num_params
;
...
...
@@ -2726,6 +2727,7 @@
/* face->driver instead. */
FT_List_Add
(
&
face
->
driver
->
faces_list
,
node
);
// TODO: The preload logic should be performed here
/* now allocate a glyph slot object for the face */
FT_TRACE4
((
"FT_Open_Face: Creating glyph slot
\n
"
));
...
...
@@ -4908,6 +4910,10 @@
pixel_modes
[
slot
->
bitmap
.
pixel_mode
],
slot
->
bitmap
.
pixel_mode
));
if
(
pitch
<
0
)
{
pitch
=
-
pitch
;
}
for
(
i
=
0
;
i
<
rows
;
i
++
)
for
(
j
=
0
;
j
<
pitch
;
j
++
)
coverage
+=
bitmap
.
buffer
[
i
*
pitch
+
j
];
...
...