Oberon Community Platform Forum
November 19, 2019, 06:36:12 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Increasing font size in A2 on OS X  (Read 23082 times)
dukester
Full Member
***
Posts: 140


On Faceflow I'm 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
Logged

duke
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #1 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.
Logged
dukester
Full Member
***
Posts: 140


On Faceflow I'm dukester


« Reply #2 on: June 16, 2010, 10:01:34 PM »

Setting WindowManager->FontManager->DefaultFont->Size in Configuration.XML.

I found that one! Wink

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
Logged

duke
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #3 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  Wink 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.


Logged
dukester
Full Member
***
Posts: 140


On Faceflow I'm dukester


« Reply #4 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
Logged

duke
dukester
Full Member
***
Posts: 140


On Faceflow I'm dukester


« Reply #5 on: June 17, 2010, 07:23:40 PM »

[snip]

Not yet  Wink 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
Logged

duke
sage
Full Member
***
Posts: 170



WWW
« Reply #6 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
« Last Edit: June 17, 2010, 11:03:16 PM by sage » Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #7 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.
Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #8 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.
Logged
dukester
Full Member
***
Posts: 140


On Faceflow I'm dukester


« Reply #9 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
Logged

duke
dukester
Full Member
***
Posts: 140


On Faceflow I'm dukester


« Reply #10 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
Logged

duke
dukester
Full Member
***
Posts: 140


On Faceflow I'm dukester


« Reply #11 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

Logged

duke
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #12 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.
Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #13 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.
Logged
dukester
Full Member
***
Posts: 140


On Faceflow I'm dukester


« Reply #14 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....
Logged

duke
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!