Revert "racket/draw win32: work around a Pango bug"
This reverts commit 8f9606007f
.
Figured out how to compile and fix Pango after all.
This commit is contained in:
parent
bb9068641b
commit
4cc9eb0326
|
@ -44,11 +44,6 @@
|
||||||
black)
|
black)
|
||||||
(color->immutable-color c)))
|
(color->immutable-color c)))
|
||||||
|
|
||||||
;; The Windows version of Pango crashes on characters
|
|
||||||
;; #\U1D173 through #\U1D17A (which are unusual characters
|
|
||||||
;; replated to music notation), so work around it:
|
|
||||||
(define broken-music-pango? (eq? (system-type) 'windows))
|
|
||||||
|
|
||||||
;; dc-backend : interface
|
;; dc-backend : interface
|
||||||
;;
|
;;
|
||||||
;; This is the interface that the backend specific code must implement
|
;; This is the interface that the backend specific code must implement
|
||||||
|
@ -1284,19 +1279,11 @@
|
||||||
[blank? (string=? s "")]
|
[blank? (string=? s "")]
|
||||||
[s (if (and (not draw-mode) blank?) " " s)]
|
[s (if (and (not draw-mode) blank?) " " s)]
|
||||||
[s (if (for/or ([c (in-string s)])
|
[s (if (for/or ([c (in-string s)])
|
||||||
(or (eqv? c #\uFFFE)
|
(or (eqv? c #\uFFFE) (eqv? c #\uFFFF)))
|
||||||
(eqv? c #\uFFFF)
|
|
||||||
(and broken-music-pango?
|
|
||||||
(let ([n (char->integer c)])
|
|
||||||
(<= #x1D173 n #x1D17A)))))
|
|
||||||
;; Since \uFFFE and \uFFFF are not supposed to be in any
|
;; Since \uFFFE and \uFFFF are not supposed to be in any
|
||||||
;; interchange, we must replace them away before passing a
|
;; interchange, we must replace them away before passing a
|
||||||
;; string to Pango:
|
;; string to Pango:
|
||||||
(regexp-replace* (if broken-music-pango?
|
(regexp-replace* #rx"[\uFFFE\uFFFF]" s "\uFFFD")
|
||||||
#rx"[\uFFFE\uFFFF\U1D173-\U1D17A]"
|
|
||||||
#rx"[\uFFFE\uFFFF]")
|
|
||||||
s
|
|
||||||
"\uFFFD")
|
|
||||||
s)]
|
s)]
|
||||||
[rotate? (and draw-mode (not (zero? angle)))]
|
[rotate? (and draw-mode (not (zero? angle)))]
|
||||||
[smoothing-index (get-smoothing-index font)]
|
[smoothing-index (get-smoothing-index font)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user