Oberon Community Platform Forum

Support => Installation => Topic started by: dukester on June 15, 2010, 10:13:42 PM



Title: Increasing font size in A2 on OS X
Post by: dukester on June 15, 2010, 10:13:42 PM
The default font size shipped with A2 is too small for comfort. What file do I edit to:
1. select another font
2. change font size
--
duke


Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 16, 2010, 08:44:13 AM
Setting WindowManager->FontManager->DefaultFont->Size in Configuration.XML.

You can use the TextStyles tool to change the size of the currently selected text (MainMenu->Edit->Styles).

In SyntaxHighlighter.XML you can change the font size in case you're using the syntax highlighter.


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 16, 2010, 10:01:34 PM
Setting WindowManager->FontManager->DefaultFont->Size in Configuration.XML.

I found that one! ;)

Quote
You can use the TextStyles tool to change the size of the currently selected text (MainMenu->Edit->Styles).

That's cool!

Quote
In SyntaxHighlighter.XML you can change the font size in case you're using the syntax highlighter.

I'm not using that syntax highlighting at the moment. When I do, where is SyntaxHighlighter.XML?

All I trying to do is to set a default font for all text material, like the "Tutorial", and the stuff that appears in "Kernel.Log". Can this be done?
--
duke


Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 17, 2010, 11:36:44 AM
Quote
I'm not using that syntax highlighting at the moment. When I do, where is SyntaxHighlighter.XML?
If you haven't found this file, the syntax highlighter is not part of the revision of UnixAos that you use.

Quote
All I trying to do is to set a default font for all text material, like the "Tutorial", and the stuff that appears in "Kernel.Log". Can this be done?
Not yet  ;) For texts as Tutorial.Text, the font sizes are typically provided by the text itself, so you cannot globally change it (in this case, use the Text Styles tool to increase the font size).
The KernelLog font size is hard-coded.




Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 17, 2010, 01:52:42 PM
@Sven

Thanks for your comments!

If I could get the windows to zoom with the "META-mousewheel", would that increase font-size when zooming-in?
--
duke


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 17, 2010, 07:23:40 PM
[snip]

Not yet  ;) For texts as Tutorial.Text, the font sizes are typically provided by the text itself, so you cannot globally change it (in this case, use the Text Styles tool to increase the font size).
The KernelLog font size is hard-coded.

What about the font size used in the PET? I did find the SyntaxHighlight.XML file, but there seems to be no way to change the font size. I tried highlighting the source code, and then using "Edit/Styles" - No Joy!
--
duke


Title: Re: Increasing font size in A2 on OS X
Post by: sage on June 17, 2010, 11:00:46 PM
I did find the SyntaxHighlight.XML file, but there seems to be no way to change the font size.
Quote
<SyntaxHighlighter>
   <Styles>
      <Style name="Comment" fontname="Syntax" fontsize="10" fontstyle="{}" color="808080FF"/>
      <Style name="CommentItalic" fontname="Syntax" fontsize="10" fontstyle="{1}" color="808080FF"/>
      <Style name="Control" fontname="Syntax" fontsize="10" fontstyle="{0}" color="FFFF"/>
      ...
Possible size values for Syntax font are: 10, 12, 14, 16, 20 and 24


Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 18, 2010, 09:12:08 AM
Quote
If I could get the windows to zoom with the "META-mousewheel", would that increase font-size when zooming-in?
Yes, but since zooming works with scaling up bitmaps, it is most likely not what you want.


Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 18, 2010, 09:17:27 AM
Possible solutions for PET with syntax highlighting are

a) Set the fontsize attributes of styles that are used as sage suggests, and, additionally set the defaultstyle attribute of the Highlighter element. The defaultstyle determines what formatting a text has in case that the highlighter did not highlight it. No defaultstyle means that the original formatting of the text is shown.

<Highlighter name="Oberon" defaultstyle="Normal">

b) Try to set fontsize="*". This means take the font size from text. With this setting, you should be able to use the Text Style tool to increase/decrease the font size of highlighted texts. I've implemented this once - not sure whether it currently works...

If you don't case about the formatting of the text itself, prefer option a) since it is more efficient.


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 18, 2010, 04:51:12 PM
Quote
<SyntaxHighlighter>
   <Styles>
      <Style name="Comment" fontname="Syntax" fontsize="10" fontstyle="{}" color="808080FF"/>
      <Style name="CommentItalic" fontname="Syntax" fontsize="10" fontstyle="{1}" color="808080FF"/>
      <Style name="Control" fontname="Syntax" fontsize="10" fontstyle="{0}" color="FFFF"/>
      ...
Possible size values for Syntax font are: 10, 12, 14, 16, 20 and 24

Very Cool! Worked like a charm! Thanks  a lot...
--
Duke


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 18, 2010, 04:58:20 PM
Possible solutions for PET with syntax highlighting are

a) Set the fontsize attributes of styles that are used as sage suggests, and, additionally set the defaultstyle attribute of the Highlighter element. The defaultstyle determines what formatting a text has in case that the highlighter did not highlight it. No defaultstyle means that the original formatting of the text is shown.

<Highlighter name="Oberon" defaultstyle="Normal">

b) Try to set fontsize="*". This means take the font size from text. With this setting, you should be able to use the Text Style tool to increase/decrease the font size of highlighted texts. I've implemented this once - not sure whether it currently works...

If you don't case about the formatting of the text itself, prefer option a) since it is more efficient.

All "Good Stuff"! Thanks. Now that I'm able to tweek A2 to behave properly on this Mac,   and becoming more familiar with the "Oberon Way", I'm beginning to like the environment _a lot_. Your patient and kind input has to be the greatest part of the reason why that is so. Thank you!
--
Duke


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 18, 2010, 05:37:30 PM
Quote
If I could get the windows to zoom with the "META-mousewheel", would that increase font-size when zooming-in?
Yes, but since zooming works with scaling up bitmaps, it is most likely not what you want.

I see! The Tutorial.Text file says:

Quote
Desktop Navigation using the keyboard and the mouse

                Meta-Mouse-Wheel : zoom in/out (WinAos: Use Shift-Alt-Wheel)
                Meta-Mouse-Move : pan the viewport if the mouse hits the border of the screen (WinAos: not supported)
                Meta-PgUp : zoom in 2x
                Meta-PgDn : zoom out 2x
                Meta-Home : All desktop elements visible
                Meta-End : zoom to 1:1
                Meta-Left : Move viewport left by one screen in the current zoom factor
                Meta-Right : Move viewport right by one screen in the current zoom factor
                Meta-Up : Move viewport up by one screen in the current zoom factor
                Meta-Down : Move viewport down by one screen in the current zoom factor
               
                Alt-Shift is a substitute for the Meta key. (The meta key is often marked with symbol that is associated  with big software vendor)

This is what I've been trying to get working on my IMac->X11. However, someone familiar with the Oberon OS, has recently informed me that the above quotation from the tutorial only applies to "native" Oberon, and _not_ for the "hosted" versions. Would you agree with that?
--
duke



Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 18, 2010, 09:17:49 PM
Quote
[...] only applies to "native" Oberon, and _not_ for the "hosted" versions. Would you agree with that?
Not entirely....

The source code of the window manager (for this function WindowManager.Mod) is the same for all versions of A2/WinAos/UnixAos. The WindowManager.ViewPort object that is implementing these functions says...

Code:
meta := (flags * Inputs.Meta # {}) OR ((flags * Inputs.Alt # {}) & (flags * Inputs.Shift # {}));

as noted in the quoted text.

Have you tried holding down SHIFT-ALT instead of META in UnixAos?

If this does not work, open WMKeyCode.Open and see whether pressing the SHIFT-ALT key combination is displayed when it is pressed. In WinAos, for example, pressing only the Meta-key is not seen because Windows intercepts this key message.

Panning is similar. When running WinAos "as is", panning to the left and right works. Up and down does not work because the cursor leaves the WinAos window. This will most likely be an issue under UnixAos, too. But zooming should work.


Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 18, 2010, 09:25:09 PM
Ohhh... also worth to mention:

If you like zooming & navigation in the infinite desktop, have a look at the hotkeys defined for the keys F1 - F5 (see HotKeys.XML, can be enabled using the command HotKeys.Open~). These hotkeys essentially implement a virtual desktop by simply calling a command that sets the position and size of the viewport. F4 can be quite useful since it brings you back to the original screen position and zoom factor 1.


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 18, 2010, 11:52:41 PM
[snip]

Have you tried holding down SHIFT-ALT instead of META in UnixAos?

If this does not work, open WMKeyCode.Open and see whether pressing the SHIFT-ALT key combination is displayed when it is pressed. In WinAos, for example, pressing only the Meta-key is not seen because Windows intercepts this key message.

SHIFT-ALT did not work; and WMKeyCode shows nothing when I press those 2 keys. Same behavior for the Apple Command Key. Oh well....


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 18, 2010, 11:54:23 PM
Ohhh... also worth to mention:

If you like zooming & navigation in the infinite desktop, have a look at the hotkeys defined for the keys F1 - F5 (see HotKeys.XML, can be enabled using the command HotKeys.Open~). These hotkeys essentially implement a virtual desktop by simply calling a command that sets the position and size of the viewport. F4 can be quite useful since it brings you back to the original screen position and zoom factor 1.

HotKeys work just fine. Actually this behavior is very similar to that of OS X ;) Thanks for the tip....


Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 21, 2010, 08:59:27 AM
Quote
SHIFT-ALT did not work; and WMKeyCode shows nothing when I press those 2 keys. Same behavior for the Apple Command Key. Oh well....
Well, then you've just discovered a bug in UnixAos ;)


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 23, 2010, 11:05:21 PM
Did you report it, or should I? ;)
--
duke


Title: Re: Increasing font size in A2 on OS X
Post by: staubesv on June 24, 2010, 11:33:05 AM
I wrote an E-mail to Guenter Feldmann (he is the creator/maintainer of UnixAos).


Title: Re: Increasing font size in A2 on OS X
Post by: dukester on June 24, 2010, 04:55:36 PM
Thank you!


Title: Re: Increasing font size in A2 on OS X
Post by: peasthope on July 02, 2012, 04:30:59 PM
... since zooming works with scaling up bitmaps, it is most likely not what you want.

Hello Sven; is the scale factor strictly 2^n where n is an integer?  Is that why you say "not what you want"?

The gestural zooming on an iPad works well.  I wonder what scale factors are used and how the scaling is implemented.  A2 might benefit from some of the techniques.

Regards,         ... Peter Easthope