Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inverse text w/o manipulating grobs?

3 views
Skip to first unread message

blro...@my-deja.com

unread,
Jul 30, 2000, 3:00:00 AM7/30/00
to
does anyone know of a way to display inverse text (medium font) without
manipulating grobs? (in SysRPL)


Sent via Deja.com http://www.deja.com/
Before you buy.

Georg Zotti

unread,
Jul 31, 2000, 3:00:00 AM7/31/00
to
blro...@my-deja.com wrote:
> does anyone know of a way to display inverse text (medium font) without
> manipulating grobs? (in SysRPL)

Font style is coded in the string itself. Just put
"\019\004\019" (sequences of 3 characters, decimal values given) before
and after the area you want inverted.

--
Georg Zotti, e912...@student.tuwien.ac.at


Veli-Pekka Nousiainen

unread,
Jul 31, 2000, 3:00:00 AM7/31/00
to
How about releasing (one more time)
ALL the font manipulation codes
(Bold, Inv, Udl, Italic, other?)

VPN

"Georg Zotti" <e912...@stud4.tuwien.ac.at> wrote in message
news:8m2jnq$qr6$1...@news.tuwien.ac.at...

Georg Zotti

unread,
Jul 31, 2000, 3:00:00 AM7/31/00
to
Veli-Pekka Nousiainen <vp.nou...@lapinlahden-teknologiakeskus.fi> wrote:
> How about releasing (one more time)
> ALL the font manipulation codes
> (Bold, Inv, Udl, Italic, other?)

> VPN

And how about finding them yourself? (More fun... ;-)
Just write a short string and analyze it ( repeated HEAD NUM )

OK, here's my program I played with:
<< DUP SIZE -> s l
<< 1. l FOR i s i DUP SUB NUM
NEXT
l ->LIST
>>
>>
You may even find how to code with multiple fonts!
--
Georg Zotti, e912...@student.tuwien.ac.at


Veli-Pekka Nousiainen

unread,
Jul 31, 2000, 3:00:00 AM7/31/00
to
"Georg Zotti" <e912...@stud4.tuwien.ac.at> wrote in message
news:8m3tvp$ecd$1...@news.tuwien.ac.at...

> Veli-Pekka Nousiainen <vp.nou...@lapinlahden-teknologiakeskus.fi>
wrote:
> > How about releasing (one more time)
> > ALL the font manipulation codes
> > (Bold, Inv, Udl, Italic, other?)
>
> > VPN
>
> And how about finding them yourself? (More fun... ;-)
> Just write a short string and analyze it ( repeated HEAD NUM )

I'm on a lazy moode :-)

> OK, here's my program I played with:
> << DUP SIZE -> s l
> << 1. l FOR i s i DUP SUB NUM
> NEXT
> l ->LIST
> >>
> >>
> You may even find how to code with multiple fonts!
> --
> Georg Zotti, e912...@student.tuwien.ac.at
>

OK, partial results

19,1,19 BOLD 19,1,19
19,2,19 ITALIC 19,2,19
19,3,19 UNDERLINED 19,3,19
19,4,19 INVERTED 19,4,19

Ideas:
Maybe ACO will add som new codes like blinking
or strikethrough or upperlined or backslanted or
superscript or subscript or upsidedown or mirror...

Opinions?

VPN


Georg Zotti

unread,
Jul 31, 2000, 3:00:00 AM7/31/00
to
Veli-Pekka Nousiainen <vp.nou...@lapinlahden-teknologiakeskus.fi> wrote:
> Ideas:
> Maybe ACO will add som new codes like blinking
> or strikethrough or upperlined or backslanted or
> superscript or subscript or upsidedown or mirror...

> Opinions?
> VPN
Of course they are free to do so, but who uses slanted anyway?
On the downside, you lose characters which you might otherwise
change to add symbols (more greek letters, etc.) not included
in the standard HP49 font.

--
Georg Zotti, e912...@student.tuwien.ac.at


Veli-Pekka Nousiainen

unread,
Aug 1, 2000, 3:00:00 AM8/1/00
to
"Georg Zotti" <e912...@stud4.tuwien.ac.at> wrote in message
news:8m4ao4$jnl$1...@news.tuwien.ac.at...

> Veli-Pekka Nousiainen <vp.nou...@lapinlahden-teknologiakeskus.fi>
wrote:
> > Ideas:
> > Maybe ACO will add som new codes like blinking
> > or strikethrough or upperlined or backslanted or
> > superscript or subscript or upsidedown or mirror...
>
> > Opinions?
> > VPN
> Of course they are free to do so, but who uses slanted anyway?
not me, but blinking I would use !

> On the downside, you lose characters which you might otherwise
> change to add symbols (more greek letters, etc.) not included
> in the standard HP49 font.

How can this be possible? Please explain.
(I have different fonts on my machine for these kind of purposes)

remove_vp.nousiainen

> --
> Georg Zotti, e912...@student.tuwien.ac.at
>

Georg Zotti

unread,
Aug 1, 2000, 3:00:00 AM8/1/00
to
Veli-Pekka Nousiainen <vp.nou...@lapinlahden-teknologiakeskus.fi> wrote:
> "Georg Zotti" <e912...@stud4.tuwien.ac.at> wrote in message
> news:8m4ao4$jnl$1...@news.tuwien.ac.at...

>> On the downside, you lose characters which you might otherwise


>> change to add symbols (more greek letters, etc.) not included
>> in the standard HP49 font.
> How can this be possible? Please explain.
> (I have different fonts on my machine for these kind of purposes)

E.g., if you happen to change character 19 to some symbol you
need, and then you type something with a <#19><any><#19>, your
calculator will misunderstand you as soon as <any> has been redefinded
to mean the switch code for, e.g., "blinking".
(Actually a similar thing had happened to me before I found out
about the <#19> codes...)
So, plain guess is to leave at least characters 0..20 untouched.

--
Georg Zotti, e912...@student.tuwien.ac.at


Veli-Pekka Nousiainen

unread,
Aug 2, 2000, 3:00:00 AM8/2/00
to
I leave only character 19d untouched,
but thanks for the warning anyway !
VPN

"Georg Zotti" <e912...@stud4.tuwien.ac.at> wrote in message

news:8m7mk6$a04$1...@news.tuwien.ac.at...

David Haguenauer

unread,
Aug 5, 2000, 3:00:00 AM8/5/00
to
>How about releasing (one more time)
>ALL the font manipulation codes

Here we go (8.XI.1999 post):

---
Style is controlled by "31nn31" toggle strings (i.e. $13 $n $13), where $n
should be in 1..4 for style-only effects (I don't know yet for fonts):
1 for bold
2 for italic
3 for underlined
4 for inverse

If you wanted a bold "A" (character $41), you would type "31103114311031".
Notice that there's a pretty clever trick, the control strings are both
toggles and symmetric, therefore reversing (SREV) a string doesn't affect
Style.
---

More precisely, "31103114311031" is:
311031: switch effect one (bold) on
14: regular character "A" ($41)
311031: switch bold off

There is also a way to use different fonts in the same string. To be
accessible, such fonts should have the same height as the current system
font, and have different numbers.

Although I tried to know how exactly fonts were announced in a string, I
still didn't find. There seems to be sometimes two "31xx31" control
strings, and sometimes only one... I suspect that docs are available
somewhere.

David Haguenauer
http://zap.to/hsimpson

Joseph K. Horn

unread,
Aug 5, 2000, 3:00:00 AM8/5/00
to
David Haguenauer wrote:

> Although I tried to know how exactly fonts were announced in a
> string, I still didn't find. There seems to be sometimes two
> "31xx31" control strings, and sometimes only one... I suspect that
> docs are available somewhere.

The following is directly from Jean-Yves, quoted verbatim:

The font numbering is effectively limited to 244. The reason is the way
a font in the command line is called.

The syntax for the style and font changing is:
<CHR 19> <CODE_CHANGE> <CHR 19>

CODE_CHANGE will be:
1: Bold
2: Italic
3: Underline
4: Inverse

To change the font it will be:
11+ID_FONT

So you won't have a conflict when calculating the number of carriage
returns in the text (easier to program).

As you can see, the font ID number can't be more than 244 otherwise a
carry will occur and may conflict with the style coding.

There is enough memory allocated in the system to handle 256 different
fonts, but it's in fact not possible to use more than 244. In fact, any
fonts with an ID > 244 will simply be ignored by the system when
searching the memory for fonts. So a font with an ID > 244 can be used
as a system font (with the command ->FONT), but can't be selected using
the font changing utilities.

Hope this help
Jean-Yves

PS from Joe: You can use the FONTX program to renumber (and rename)
HP49 fonts. It's available from Eric Rechlin's archive:
http://www.hpcalc.org/hp49/utils/fonts/fontx.zip

David Haguenauer

unread,
Aug 7, 2000, 3:00:00 AM8/7/00
to
Thank you very much for this reply.

>> Although I tried to know how exactly fonts were announced in a
>> string, I still didn't find. There seems to be sometimes two
>> "31xx31" control strings, and sometimes only one... I suspect that
>> docs are available somewhere.
>
>The following is directly from Jean-Yves, quoted verbatim:

>[complete explanation & trivia]

>PS from Joe: You can use the FONTX program to renumber (and rename)
>HP49 fonts. It's available from Eric Rechlin's archive:

I know this program since it was released, and it does a great job, but
hex-editing is so much fun that I usually renumber by hand *too*!


Thanks again. I didn't know the existence of this message from Jean-Yves
Avenard.


David Haguenauer
http://zap.to/hsimpson

David Haguenauer

unread,
Aug 7, 2000, 3:00:00 AM8/7/00
to
Long message, and I'm sorry about it, but I think there's something that
Jean-Yves didn't fully explain...

>> Although I tried to know how exactly fonts were announced in a
>> string, I still didn't find. There seems to be sometimes two
>> "31xx31" control strings, and sometimes only one... I suspect that
>> docs are available somewhere.

>The following is directly from Jean-Yves, quoted verbatim:

>[...]


>The syntax for the style and font changing is:
><CHR 19> <CODE_CHANGE> <CHR 19>


>CODE_CHANGE will be:
>1: Bold
>2: Italic
>3: Underline
>4: Inverse
>
>To change the font it will be:
>11+ID_FONT


But there's something else. Say I write the string "D'oh!" using the Homer
8 font (number 15).

15+11=#1Ah

Here is the string in hex (header and size removed):
31B031 ;tag that indicates a font change (?)
31A131 ;toggle for font "A1"
4472F68612 ;characters for "D'oh!"
31A131 ;toggle for font "A1"
31B031 ;tag that indicates a font change (?)

Looks easy... But why was the "tag" needed?

Let's try "A A", the first character uses font number 15, the third one
uses font number 16:

31B031 ;start_font
31A131 ;font 15 on
14 ;character 'A'
31A131 ;font 15 off
31B031 ;end_font
02 ;character ' '
31B031 ;start_font
31B131 ;font 16 on
14 ;character 'A'
31B131 ;font 16 off
31B031 ;end_font

It seems that every time the font is changed using $13 $<11d+fontnum> $13,
we also have a "tag" that takes up three more bytes (twice).
However, if I had written "FOG", had selected all three characters, had
assigned font 15 to them, and then had assigned font 16 to the 'O' alone,
I would have a different result, summarized here (hex dumps become
boring):
<start/end_font>
<font15>'F'<font15>
<font16>'O'<font16>
<font15>'G'<font15>
<start/end_font>

Only six bytes seem to be wasted, although there are three different
ranges in the string! The "tag" isn't needed everytime.

Even better. Let's remove all $130B13 of a given string: it keeps its
attributes!

So, the question I ask is: is there an obvious reason why the string
editor inserts *two* different control sequences everytime a font is
assigned to part of a string? Otherwise, would it be safe to release a
'useless sequence remover' program?


David Haguenauer
http://zap.to/hsimpson

Joseph K. Horn

unread,
Aug 7, 2000, 3:00:00 AM8/7/00
to
David Haguenauer wrote:

> So, the question I ask is: is there an obvious reason why the string
> editor inserts *two* different control sequences everytime a font is
> assigned to part of a string? Otherwise, would it be safe to release
> a 'useless sequence remover' program?

No, don't remove them. They are there to allow nested font changes.
So if you switch from font A to font B and then to font C, the HP49
will nicely return to font B when you exit font C, and then back to
font A when you exit font B. And, due to the symmetry, the nested
fonts are even displayed correctly when the string is reversed with
SREV (as was mentioned recently in another posting).

-Joe-

Veli-Pekka Nousiainen

unread,
Aug 8, 2000, 3:00:00 AM8/8/00
to
Thnx !
VPN
PS: try SREV

"David Haguenauer" <hsam...@lemel.fr> wrote in message
news:8mnagr$6ms$4...@front5m.grolier.fr...

David Haguenauer

unread,
Aug 20, 2000, 3:00:00 AM8/20/00
to
>> So, the question I ask is: is there an obvious reason why the string
>> editor inserts *two* different control sequences everytime a font is
>> assigned to part of a string? Otherwise, would it be safe to release
>> a 'useless sequence remover' program?
>
>No, don't remove them. They are there to allow nested font changes.
>So if you switch from font A to font B and then to font C, the HP49
>will nicely return to font B when you exit font C, and then back to
>font A when you exit font B. And, due to the symmetry, the nested
>fonts are even displayed correctly when the string is reversed with
>SREV (as was mentioned recently in another posting).


(the posting was by me!)

There's a little misunderstanding here. I understood that "ABC" with font
#5 would be coded as follows:

<toggle font #5>ABC<toggle font #5>

So that, when reversed, it becomes:

<toggle font #5>CBA<toggle font #5>

And retains the font information for each part of the string.

BUT what I don't understand is that the actual way this is coded is:

<useless token><toggle font #5>ABC<toggle font #5><useless token>

With a couple of <useless token>s for each part of the string that uses a
different font! Apparently, the font doesn't get rendered differently when
the <useless token>s are removed, but there must be a reason why it's
here! I can't imagine it being useless...

When I ask why two tokens are inserted for each font change, I don't mean
that there should only be one, but that there should be zero.

I hope someone is going to be able to answer this.


David Haguenauer
http://zap.to/hsimpson

0 new messages