summaryrefslogtreecommitdiff
path: root/src/ui/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/text.c')
-rw-r--r--src/ui/text.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index 674e2a72..6af7d6d1 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -24,6 +24,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
24#include "color.h" 24#include "color.h"
25#include "metrics.h" 25#include "metrics.h"
26#include "embedded.h" 26#include "embedded.h"
27#include "window.h"
27#include "app.h" 28#include "app.h"
28 29
29#define STB_TRUETYPE_IMPLEMENTATION 30#define STB_TRUETYPE_IMPLEMENTATION
@@ -702,6 +703,7 @@ void cacheTextGlyphs_Font_(iFont *d, const iRangecc text) {
702 iArray * rasters = NULL; 703 iArray * rasters = NULL;
703 SDL_Texture *oldTarget = NULL; 704 SDL_Texture *oldTarget = NULL;
704 iBool isTargetChanged = iFalse; 705 iBool isTargetChanged = iFalse;
706 iAssert(isExposed_Window(get_Window()));
705 /* We'll flush the buffered rasters periodically until everything is cached. */ 707 /* We'll flush the buffered rasters periodically until everything is cached. */
706 while (chPos < text.end) { 708 while (chPos < text.end) {
707 while (chPos < text.end) { 709 while (chPos < text.end) {
@@ -1017,7 +1019,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) {
1017 int x1 = iMax(xpos, xposExtend); 1019 int x1 = iMax(xpos, xposExtend);
1018 /* Which half of the pixel the glyph falls on? */ 1020 /* Which half of the pixel the glyph falls on? */
1019 const int hoff = enableHalfPixelGlyphs_Text ? (xpos - x1 > 0.5f ? 1 : 0) : 0; 1021 const int hoff = enableHalfPixelGlyphs_Text ? (xpos - x1 > 0.5f ? 1 : 0) : 0;
1020 if (!isRasterized_Glyph_(glyph, hoff)) { 1022 if (mode & draw_RunMode && !isRasterized_Glyph_(glyph, hoff)) {
1021 /* Need to pause here and make sure all glyphs have been cached in the text. */ 1023 /* Need to pause here and make sure all glyphs have been cached in the text. */
1022 cacheTextGlyphs_Font_(d, args->text); 1024 cacheTextGlyphs_Font_(d, args->text);
1023 glyph = glyph_Font_(d, ch); /* cache may have been reset */ 1025 glyph = glyph_Font_(d, ch); /* cache may have been reset */