PDA

View Full Version : Text and special characters


fcoexposito
05-20-2004, 10:14 PM
In the special character, how can you add new special characters as well as the existing in hp_symbols_2? I tried in defaults.m (version 12.01C) but the number that I push doesn´t match with ascii code.
Also, can you change the type of font?

John Scheffel
05-24-2004, 01:52 PM
I haven't tried this, but you might want to check the following command under Help, Prog Ref Guide.

ADD_SPEC_CHAR

You might also want to investigate the Font Editor, which allows you to create custom fonts or add/modify characters in standard fonts.

fcoexposito
05-24-2004, 11:01 PM
I use ADD_SPEC_CHAR, but it doesn´t match with ascii code. For example, if I push the number 164 (in ascii is 'ñ') the result with the ADD_SPEC_CHAR function is another symbol.

John Scheffel
05-25-2004, 08:40 AM
It appears that ADD_SPEC_CHAR is restricted to using the hp_symbols and hp_symbols_2 fonts. These fonts don't use standard ASCII character mappings, so the symbol you get may not match the standard ASCII character. If you use the Font Editor to edit one of these fonts, you can use the Show Font function to display the symbols which correspong for each ASCII character number. For example, in the hp_symbols_2 font, character 164 is the Perpendicular symbol.

gmatelich
05-27-2004, 09:31 AM
CHAR_LAYOUT might be what you're after
for example:
{adds TM symbol to #t or (CHR 20) or ctrl/t key}
current_font 'hp_block_c' CHAR_LAYOUT #T 0,104 34,104 34,100 19,100 19,75 15,75 15,100 0,100 0,104 break 36,104 43,104 52,82 61,104 68,104 68,76 64,76 64,100 54,76 50,76 40,100 40,76 36,76 36,104 end
current_font 'hp_block_v' CHAR_LAYOUT #T 0,104 34,104 34,100 19,100 19,75 15,75 15,100 0,100 0,104 break 36,104 43,104 52,82 61,104 68,104 68,76 64,76 64,100 54,76 50,76 40,100 40,76 36,76 36,104 end