Skip to content

Commit 88ee95c

Browse files
committed
Fix enumerator issue
1 parent 9219179 commit 88ee95c

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

draw.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,14 @@ int16_t *font_metric_split_text(int fontid, char *text, int edge, int indent) {
249249
PangoLayoutLine *line = e->data;
250250
*pos++ = (int16_t)(line->length);
251251
}
252+
#ifdef PANGO_AVAILABLE_ENUMERATOR_IN_1_56
252253
pango_layout_set_wrap(f->layout, PANGO_WRAP_NONE);
254+
#else
255+
static char *zero = "\0";
256+
pango_layout_set_text(f->layout, zero, 0);
257+
pango_layout_set_width(f->layout, -1);
258+
pango_layout_set_indent(f->layout, 0);
259+
#endif
253260
return out;
254261
}
255262

four/draw.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,14 @@ int16_t *font_metric_split_text(int fontid, char *text, int edge, int indent) {
249249
PangoLayoutLine *line = e->data;
250250
*pos++ = (int16_t)(line->length);
251251
}
252+
#ifdef PANGO_AVAILABLE_ENUMERATOR_IN_1_56
252253
pango_layout_set_wrap(f->layout, PANGO_WRAP_NONE);
254+
#else
255+
static char *zero = "\0";
256+
pango_layout_set_text(f->layout, zero, 0);
257+
pango_layout_set_width(f->layout, -1);
258+
pango_layout_set_indent(f->layout, 0);
259+
#endif
253260
return out;
254261
}
255262

0 commit comments

Comments
 (0)