[Oberon] units of voff of a Text

Jörg joerg.straube at iaeth.ch
Tue Nov 7 16:30:17 CET 2017


Hi

As a kind of rule, the handling of a data structure (insert, copy,
delete...) and the display of this data structure should be split in two
different modules.

For the data structure "Text", the two modules are called
- "Texts.Mod" (handling of text pieces) and
- "TextFrames.Mod" (display of texts)

Now, Texts defines "voff" as part of the data structure and just stores it
in the data structure. "Texts.Mod" does not know whether the value is in
pixels or in percentage; it treats it transparently as a number.
"TextFrames" ignores the field "voff" altogether. So, for standard text
"voff" is not used.

But there is another module called "ScriptFrames.Mod". It takes also
Texts.Text as underlying data structure, but displays it differently than
"TextFrames.Mod. You can see "ScriptFrames" as kind of enhancement of the
more basic "TextFrames". "ScriptFrames" takes "voff" into account and
interpretes the value as percentage.

So, in short "voff=30" can mean 30 pixels or 30 percentage, depending on the
viewer module used to display the text.

br
Jörg

-----Original Message-----
From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
peter at easthope.ca
Sent: Sunday, November 05, 2017 5:43 PM
To: oberon at lists.inf.ethz.ch
Subject: [Oberon] units of voff of a Text

Hi,

http://www.ethoberon.ethz.ch/ethoberon/defs/Oberon.Def.html
"(* Remarks
  ...
The fields fnt, col and voff give information about the requested 
font, color (index), and vertical offset (in pixels)."

Script.Tool has this.
Script.ChangeOffset <offset>		+/- percent of font height

Fonts.Default here is Oberon10.Scn.Fnt.  If Script.ChangeOffset 30 is 
applied on Text using this font, voff should be 30% of 10 which is 3 
pixels.  Nevertheless voff is set to 30.  So I conclude that 
Script.Tool should be corrected.
Script.ChangeOffset <offset>		+/- pixels of font height

Can anyone agree?  A better explanation?

Thanks,                    ... Lyall E.

-- 

123456789 123456789 123456789 123456789 123456789 123456789 123456789
Tel: +1 360 639 0202                      Pender Is.: +1 250 629 3757
http://easthope.ca/Peter.html              Bcc: peter at easthope. ca

--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list