WIP: Brush assets project #106303
|
@ -375,7 +375,11 @@ enum {
|
||||||
BLF_BAD_FONT = 1 << 16,
|
BLF_BAD_FONT = 1 << 16,
|
||||||
/** This font is managed by the FreeType cache subsystem. */
|
/** This font is managed by the FreeType cache subsystem. */
|
||||||
BLF_CACHED = 1 << 17,
|
BLF_CACHED = 1 << 17,
|
||||||
/** At small sizes glyphs are rendered at multiple sub-pixel positions. */
|
/**
|
||||||
|
* At small sizes glyphs are rendered at multiple sub-pixel positions.
|
||||||
|
*
|
||||||
|
* \note Can be checked without checking #BLF_MONOSPACED which can be assumed to be disabled.
|
||||||
|
*/
|
||||||
BLF_RENDER_SUBPIXELAA = 1 << 18,
|
BLF_RENDER_SUBPIXELAA = 1 << 18,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1322,7 +1322,7 @@ GlyphBLF *blf_glyph_ensure(FontBLF *font, GlyphCacheBLF *gc, const uint charcode
|
||||||
#ifdef BLF_SUBPIXEL_AA
|
#ifdef BLF_SUBPIXEL_AA
|
||||||
GlyphBLF *blf_glyph_ensure_subpixel(FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, int32_t pen_x)
|
GlyphBLF *blf_glyph_ensure_subpixel(FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, int32_t pen_x)
|
||||||
{
|
{
|
||||||
if (!(font->flags & BLF_RENDER_SUBPIXELAA) || (font->flags & BLF_MONOCHROME)) {
|
if (!(font->flags & BLF_RENDER_SUBPIXELAA)) {
|
||||||
/* Not if we are in mono mode (aliased) or the feature is turned off. */
|
/* Not if we are in mono mode (aliased) or the feature is turned off. */
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
|
@ -460,8 +460,10 @@ void uiStyleInit()
|
||||||
if (U.text_render & USER_TEXT_DISABLE_AA) {
|
if (U.text_render & USER_TEXT_DISABLE_AA) {
|
||||||
flag_enable |= BLF_MONOCHROME;
|
flag_enable |= BLF_MONOCHROME;
|
||||||
}
|
}
|
||||||
if (U.text_render & USER_TEXT_RENDER_SUBPIXELAA) {
|
else {
|
||||||
flag_enable |= BLF_RENDER_SUBPIXELAA;
|
if (U.text_render & USER_TEXT_RENDER_SUBPIXELAA) {
|
||||||
|
flag_enable |= BLF_RENDER_SUBPIXELAA;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LISTBASE_FOREACH (uiFont *, font, &U.uifonts) {
|
LISTBASE_FOREACH (uiFont *, font, &U.uifonts) {
|
||||||
|
|
Loading…
Reference in New Issue