Lisp HUG Maillist Archive

Characters

Hello,

I encountered several problems with characters on MAC:

The code-char function doesn¹t return the same value in LW than in MCL (for
the non ASCII characters).
For instance the call (code-char 186) return #\º on LW and #\† on MCL.. It's
a question of translation between Mac-Roman and Unicode. I resolved this
problem with a double table of conversion (with infos found here :
http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT ). Doesn't it
exist a utility to do this directly in LWM ?

I work with special fonts that have some empty characters and I need to put
these sets of character in some sort of table where the user can choose it.
When encountering a blank character the call to gp:draw-character doesn't
react by printing nothing (or a vertical slash as MCL does), but print the
last "real" character before (or something like that, I don't understand
exactly what's happening). So, I tried to insert a predicate before drawing
operation to know if the character really exists. The only solution I found,
is to ask the width of the character (If the width is 0 there is no
character). But this is a very slow and inefficient way (the scroll of the
table became very slow)... Does a better solution exist ?

The last thing is a bug I suppose : To get the with of a character, I need
to use the gp:get-character-extent function, because the call to
gp:get-char-width result on this error message:
"Undefined function GRAPHICS-PORTS::%GET-CHAR-WIDTH called with arguments :
(etc.)"

Thanks

Denis


----------------------------------------------------
Denis Pousseur
6 clos du Drossart
1180 Bruxelles, Belgique

Mail :  denis.pousseur@compositeurs.be
Website : http://compositeurs.be
----------------------------------------------------




FW: Characters

I have the same problem with musical font. I wrote a message about it some
weeks ago (I joint it after). You can find in this message a part of the
solution : the necessity to convert between Mac Roman and Unicode. There is
also a web address where you can find the table of conversion.

I has no answer to my message, so it seems that there is no other solution
that doing yourself a sort of converter. Personally I did it with two
hash-tables and I made two functions naming code2char and  char2code witch
do the same thing than code-char and char-code, but with the conversion
included (so the result of conversion is the same as in MCL).

Best

Denis


----------------------------------------------------
Denis Pousseur
6 clos du Drossart
1180 Bruxelles, Belgique

Mail :  denis.pousseur@compositeurs.be
Website : http://compositeurs.be
----------------------------------------------------


------ Message transféré
De : Denis Pousseur <denis.pousseur@compositeurs.be>
Répondre à : Denis Pousseur <denis.pousseur@compositeurs.be>
Date : Wed, 01 Feb 2006 09:12:33 +0100
À : Lisp Hug Lispworks <lisp-hug@lispworks.com>
Objet : Characters


Hello,

I encountered several problems with characters on MAC:

The code-char function doesn¹t return the same value in LW than in MCL (for
the non ASCII characters).
For instance the call (code-char 186) return #\º on LW and #\† on MCL.. It's
a question of translation between Mac-Roman and Unicode. I resolved this
problem with a double table of conversion (with infos found here :
http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT ). Doesn't it
exist a utility to do this directly in LWM ?

I work with special fonts that have some empty characters and I need to put
these sets of character in some sort of table where the user can choose it.
When encountering a blank character the call to gp:draw-character doesn't
react by printing nothing (or a vertical slash as MCL does), but print the
last "real" character before (or something like that, I don't understand
exactly what's happening). So, I tried to insert a predicate before drawing
operation to know if the character really exists. The only solution I found,
is to ask the width of the character (If the width is 0 there is no
character). But this is a very slow and inefficient way (the scroll of the
table became very slow)... Does a better solution exist ?

The last thing is a bug I suppose : To get the with of a character, I need
to use the gp:get-character-extent function, because the call to
gp:get-char-width result on this error message:
"Undefined function GRAPHICS-PORTS::%GET-CHAR-WIDTH called with arguments :
(etc.)"

Thanks

Denis


----------------------------------------------------
Denis Pousseur
6 clos du Drossart
1180 Bruxelles, Belgique

Mail :  denis.pousseur@compositeurs.be
Website : http://compositeurs.be
----------------------------------------------------





------ Fin du message transféré



Updated at: 2020-12-10 08:49 UTC