Skip to content

Commit c7c6010

Browse files
committed
Be nicer to terrible fonts
1 parent 5966cdf commit c7c6010

File tree

3 files changed

+163
-79
lines changed

3 files changed

+163
-79
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ragg (development version)
22

3+
* Fix support for the default symbol font on many linux distros
4+
(StandardSymbolPS) by ensuring proper fallback during character metric
5+
calculation (#136, #201)
6+
37
# ragg 1.5.0
48

59
* Fix gradient rendering bug introduced by trying to fix #177 (#192)

src/AggDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ void AggDevice<PIXFMT, R_COLOR, BLNDFMT>::charMetric(int c, const char *family,
638638
Rf_ucstoutf8(str, (unsigned int) c);
639639
const char* str2 = Rf_utf8Toutf8NoPUA(str);
640640
int n = 0;
641-
uint32_t* res = converter.convert(str2, n);
641+
const uint32_t* res = converter.convert_to_ucs(str2, n);
642642
if (n > 0) c = res[0];
643643
}
644644
#endif

0 commit comments

Comments
 (0)