You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've approached this problem during work on McCLIM clx font part refactoring. It seems, that xlib:text-extents returns invalid values for arabic fonts (#<XLIB:FONT -arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1 :0 12583033>).
After digging a bit more, I've found, that local-text-extents returns invalid ascent/descent values for the font (i.e -32767). This is fixed, if we comment out local-text-extents and server-text-extents is always called (hack below).
Steps to reproduce:
Install xorg-fonts-misc (or arabic24.pcf.gz font from the preferred source)
NB Arabic font won't be rendered even if we have sane ascent/descent values, but this seems to be a separate issue which I'm not sure where it belongs to, or if its a bug – it may be that Arabic font can't render ASCII characters – but the system doesn't crash, only text isn't rendered).
Hack correcting behaviour (but we should fix local-text-extents instead):
diff --git a/text.lisp b/text.lisp
index dcac272..743fbaa 100644
--- a/text.lisp
+++ b/text.lisp
@@ -165,7 +165,7 @@
((integerp new-font) (incf width (the int32 new-font))))
(let (w a d l r)
- (if (or (font-char-infos-internal font) (font-local-only-p font))
+ (ifnil;(or (font-char-infos-internal font) (font-local-only-p font));; Calculate text extents locally
(progn
(multiple-value-setq (w a d l r)
@@ -254,7 +254,7 @@
((integerp new-font) (incf width (the int32 new-font))))
(incf width
- (if (or (font-char-infos-internal font) (font-local-only-p font))
+ (ifnil;(or (font-char-infos-internal font) (font-local-only-p font))
(text-extents-local font wbuf 0 buf-end :width-only)
(text-width-server font wbuf 0 buf-end)))
(when (type? new-font 'font)
The text was updated successfully, but these errors were encountered:
I've approached this problem during work on McCLIM clx font part refactoring. It seems, that
xlib:text-extents
returns invalid values forarabic
fonts (#<XLIB:FONT -arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1 :0 12583033>
).After digging a bit more, I've found, that
local-text-extents
returns invalid ascent/descent values for the font (i.e-32767
). This is fixed, if we comment outlocal-text-extents
andserver-text-extents
is always called (hack below).Steps to reproduce:
xorg-fonts-misc
(orarabic24.pcf.gz
font from the preferred source)font-selector
demo from McCLIM)NB Arabic font won't be rendered even if we have sane ascent/descent values, but this seems to be a separate issue which I'm not sure where it belongs to, or if its a bug – it may be that Arabic font can't render ASCII characters – but the system doesn't crash, only text isn't rendered).
Hack correcting behaviour (but we should fix
local-text-extents
instead):The text was updated successfully, but these errors were encountered: