Skip to content

Change font size on Mac version #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xaljox opened this issue Jun 24, 2014 · 25 comments
Closed

Change font size on Mac version #156

xaljox opened this issue Jun 24, 2014 · 25 comments

Comments

@xaljox
Copy link

xaljox commented Jun 24, 2014

By default the font sizes of eclipse are small on the Mac version and this is a known issue. The font sizes of the editor can be easily changed via the preferences. The font sizes of the tree view which are also small can not be changed via the preferences.
A search via google came up with the solution to edit the file 'e4_default_mac.css' at location '.../eclipseArduino/plugins/org.eclipse.platform_4.3.2.v20140221-1700/css'.
and to set the font_size there by adding for example:

org-eclipse-jdt-ui-PackageExplorer Tree,

org-eclipse-ui-navigator-ProjectExplorer Tree,

org-eclipse-ui-views-ContentOutline Tree,

PerspectiveSwitcher ToolBar {

font-size: 13px;
}
When trying this out, it did not work. I found it a bit strange that the solution to fix this small font issue did not work, while it was all over the internet. So I downloaded the "Eclipse IDE for C/C++ Developer" package and dit the same patch on the same file but now on the standard eclipse instead of the Arduino version of jantje. Now the patch did work, thus somehow there is a difference in behaviour in this respect and as a result it is not possible to alter the font to a size that is more pleasant for my eyes.
Another difference in behaviour I noticed was that in the "standard" eclipse version
"Preferences->General->Appearance" worked normally and a theme can be selected. While in the Arduino version I get the error: "The currently displayed page contains invalid values".
Note that I used version mac64.2014-05-22_02-07-31.tar.gz of the eclipseArduino.
Further I have to say that I love the work of Jantje!

image

@jantje
Copy link
Member

jantje commented Jun 24, 2014

txs for the input.
When you are talking about the tree view. Which treeview are you referring to? The project explorer the arduino library selector?
A possible explanation that the standard fix is not working with the project is that the project uses kepler and the work around may not work on this version.Do you get the error in the preferences also without the patch? If so please create a new issue for that one.
Jantje

@xaljox
Copy link
Author

xaljox commented Jun 24, 2014

I mean the project explorer, were you can browse your project files. The other tree views in the dialogs do also have small fonts like the preferences/property dialog and the library selector, but you do not use them that often, so the need to make those fonts larger for easier reading is not so high.
And yes without a patch on the css file I get the error on the preferences dialog.

Jimmy
Op 24 jun. 2014, om 11:59 heeft jantje [email protected] het volgende geschreven:

txs for the input.
When you are talking about the tree view. Which treeview are you referring to? The project explorer the arduino library selector?
A possible explanation that the standard fix is not working with the project is that the project uses kepler and the work around may not work on this version.Do you get the error in the preferences also without the patch? If so please create a new issue for that one.
Jantje


Reply to this email directly or view it on GitHub.

@xaljox
Copy link
Author

xaljox commented Jun 24, 2014

To give some more info, when using CSS Spy there are no entries in the CSS Class and CSS id column, while they are there for the standard eclipse.

Op 24 jun. 2014, om 11:59 heeft jantje [email protected] het volgende geschreven:

txs for the input.
When you are talking about the tree view. Which treeview are you referring to? The project explorer the arduino library selector?
A possible explanation that the standard fix is not working with the project is that the project uses kepler and the work around may not work on this version.Do you get the error in the preferences also without the patch? If so please create a new issue for that one.
Jantje


Reply to this email directly or view it on GitHub.

@jantje
Copy link
Member

jantje commented Jun 24, 2014

Not sure what is going on here. I'll see what I can do.
As it works with the standard eclipse I assume you can work around the problem with the plugin version.

@jantje
Copy link
Member

jantje commented Jun 26, 2014

I've tested this and I have been able to reproduce the problem in linux. It is a product only problem.
I'm getting more and more convinced this is a duplicate of #152

@xaljox
Copy link
Author

xaljox commented Jun 27, 2014

Changing
eclipse.product=it.baeyens.arduino.application.product
Into
eclipse.product=org.eclipse.platform.ide
in Config.ini, did help somewhat.
The changes in the e4_default_mac.css file are picked up and the "Preferences->Appearance" did work normally. However the font initially tried out was to big (16px), so I changed it to 13 and restarted eclipse, now I was back to the originl small font and whatever I tried I could not get the font to another size again, thus it seemed to work only once.
But with Css Spy I could see that there are class id's and names. When I opened the scratch pad of Css Spy (Alt-Shift-F6 + fn key for Mac) and added the following lines:
#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
font-size: 13px;
}

.MPart Tree{
font-size: 13;
}
and press apply, then I get a more decent and readable font. See screenshots attached.
schermafbeelding 2014-06-27 om 13 53 23
schermafbeelding 2014-06-27 om 13 53 45

@wimjongman
Copy link
Member

Yes it is a duplicate of #152. I will fix it.

@xaljox
Copy link
Author

xaljox commented Jul 1, 2014

This one can be closed.
The small font of the tree and outline can be enlarged by adding some line to file:
.../eclipseArduino/plugins/org.eclipse.ui.themes_1.0.0.v20140604-1608/css/e4_basestyle.css

Lines added:
#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
font-size: 13px;
}

.MPart Tree{
font-size: 13;
}

@wimjongman
Copy link
Member

Small fonts? I did notice this line (seems to be a default) in the product file [1]

[1] https://github.com/jantje/arduino-eclipse-plugin/blob/master/it.baeyens.arduino.product/arduino.product#L38

What if you remove that line and set the css back to normal?

@xaljox
Copy link
Author

xaljox commented Jul 1, 2014

Were can I find this file on the installation? I looked around, but could not find it. From a github location to were it is when installed, is not transparent in this case.

Op 1 jul. 2014, om 10:24 heeft Wim Jongman [email protected] het volgende geschreven:

Small fonts? I did notice this line (seems to be a default) in the product file [1]

[1] https://github.com/jantje/arduino-eclipse-plugin/blob/master/it.baeyens.arduino.product/arduino.product#L38

What if you remove that line and set the css back to normal?


Reply to this email directly or view it on GitHub.

@wimjongman
Copy link
Member

This information goes into the ini file which is in the root of the product.

On Tue, Jul 1, 2014 at 2:05 PM, xaljox [email protected] wrote:

Were can I find this file on the installation? I looked around, but could
not find it. From a github location to were it is when installed, is not
transparent in this case.

Op 1 jul. 2014, om 10:24 heeft Wim Jongman [email protected] het
volgende geschreven:

Small fonts? I did notice this line (seems to be a default) in the
product file [1]

[1]
https://github.com/jantje/arduino-eclipse-plugin/blob/master/it.baeyens.arduino.product/arduino.product#L38

What if you remove that line and set the css back to normal?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#156 (comment)
.

@xaljox
Copy link
Author

xaljox commented Jul 1, 2014

It works it went from:
schermafbeelding 2014-07-01 om 16 23 31
to:
schermafbeelding 2014-07-01 om 16 26 02
Thus from a 11 font to a 13 font, just I would do with the css file edit. This is a perfect solution and in my opinion a much better default. The font of the tab headers and the edit window itself can be set in the preferences pane and are stored with the workspace, so they are kept with updating the eclipse Arduino plugin.

@wimjongman
Copy link
Member

Did the remove of the setting in the ini file work or the change in the
css? Please note that now we have the theming set correctly you can also
download the chrome theme from the marketplace in which you can define most
of this through the preferences (one them bringing back the most recent
used editor behavior [1] )

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=388476

On Tue, Jul 1, 2014 at 4:29 PM, xaljox [email protected] wrote:

It works it went from:
[image: schermafbeelding 2014-07-01 om 16 23 31]
https://cloud.githubusercontent.com/assets/3994368/3444126/51a4ef94-012b-11e4-8798-b9888572f40a.png
to:
[image: schermafbeelding 2014-07-01 om 16 26 02]
https://cloud.githubusercontent.com/assets/3994368/3444165/ac2b9d28-012b-11e4-8f88-948ea64d089f.png
Thus from a 11 font to a 13 font, just I would do with the css file edit.
This is a perfect solution and in my opinion a much better default. The
font of the tab headers and the edit window itself can be set in the
preferences pane and are stored with the workspace, so they are kept with
updating the eclipse Arduino plugin.


Reply to this email directly or view it on GitHub
#156 (comment)
.

@xaljox
Copy link
Author

xaljox commented Jul 1, 2014

Yes it did work I commentd in github, with screenshots, to make clear the difference.
I will also try the chrome them and see what I can do with it. But with the bit bigger fonts I'm alreadfy happy.

On 01 Jul 2014, at 16:42, Wim Jongman [email protected] wrote:

Did the remove of the setting in the ini file work or the change in the
css? Please note that now we have the theming set correctly you can also
download the chrome theme from the marketplace in which you can define most
of this through the preferences (one them bringing back the most recent
used editor behavior [1] )

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=388476

On Tue, Jul 1, 2014 at 4:29 PM, xaljox [email protected] wrote:

It works it went from:
[image: schermafbeelding 2014-07-01 om 16 23 31]
https://cloud.githubusercontent.com/assets/3994368/3444126/51a4ef94-012b-11e4-8798-b9888572f40a.png
to:
[image: schermafbeelding 2014-07-01 om 16 26 02]
https://cloud.githubusercontent.com/assets/3994368/3444165/ac2b9d28-012b-11e4-8f88-948ea64d089f.png
Thus from a 11 font to a 13 font, just I would do with the css file edit.
This is a perfect solution and in my opinion a much better default. The
font of the tab headers and the edit window itself can be set in the
preferences pane and are stored with the workspace, so they are kept with
updating the eclipse Arduino plugin.


Reply to this email directly or view it on GitHub
#156 (comment)
.


Reply to this email directly or view it on GitHub.

@xaljox
Copy link
Author

xaljox commented Jul 1, 2014

I can not find chrome theme in market place, but did find:
Jeeeyu; eclipse theme in market place.
Is that what you mend?

On 01 Jul 2014, at 16:42, Wim Jongman [email protected] wrote:

Did the remove of the setting in the ini file work or the change in the
css? Please note that now we have the theming set correctly you can also
download the chrome theme from the marketplace in which you can define most
of this through the preferences (one them bringing back the most recent
used editor behavior [1] )

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=388476

On Tue, Jul 1, 2014 at 4:29 PM, xaljox [email protected] wrote:

It works it went from:
[image: schermafbeelding 2014-07-01 om 16 23 31]
https://cloud.githubusercontent.com/assets/3994368/3444126/51a4ef94-012b-11e4-8798-b9888572f40a.png
to:
[image: schermafbeelding 2014-07-01 om 16 26 02]
https://cloud.githubusercontent.com/assets/3994368/3444165/ac2b9d28-012b-11e4-8f88-948ea64d089f.png
Thus from a 11 font to a 13 font, just I would do with the css file edit.
This is a perfect solution and in my opinion a much better default. The
font of the tab headers and the edit window itself can be set in the
preferences pane and are stored with the workspace, so they are kept with
updating the eclipse Arduino plugin.


Reply to this email directly or view it on GitHub
#156 (comment)
.


Reply to this email directly or view it on GitHub.

@jantje
Copy link
Member

jantje commented Jul 1, 2014

@xaljox Do I understand correctly that in the latest version removing
-Dorg.eclipse.swt.internal.carbon.smallFonts
makes the font go bigger?
I'm thinking about adding this to the faq

@xaljox
Copy link
Author

xaljox commented Jul 1, 2014

Yes that brings it to a size that works both nicely for my iMac 27 and my macBook Air 13Inch. Depending on screen size and resolution your milage may vary. But I think for most Mac users the bigger fonts are preferable. It is not that it gets the size that it is readable for the half blind. It goes from 11px to 13px.

On 01 Jul 2014, at 18:07, jantje [email protected] wrote:

@xaljox Do I understand correctly that in the latest version removing
-Dorg.eclipse.swt.internal.carbon.smallFonts
makes the font go bigger?
I'm thinking about adding this to the faq


Reply to this email directly or view it on GitHub.

@wimjongman
Copy link
Member

Yes

Met vriendelijke groet,

Wim

On 1 jul. 2014, at 18:06, xaljox [email protected] wrote:

I can not find chrome theme in market place, but did find:
Jeeeyu; eclipse theme in market place.
Is that what you mend?

On 01 Jul 2014, at 16:42, Wim Jongman [email protected] wrote:

Did the remove of the setting in the ini file work or the change in the
css? Please note that now we have the theming set correctly you can also
download the chrome theme from the marketplace in which you can define most
of this through the preferences (one them bringing back the most recent
used editor behavior [1] )

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=388476

On Tue, Jul 1, 2014 at 4:29 PM, xaljox [email protected] wrote:

It works it went from:
[image: schermafbeelding 2014-07-01 om 16 23 31]
https://cloud.githubusercontent.com/assets/3994368/3444126/51a4ef94-012b-11e4-8798-b9888572f40a.png
to:
[image: schermafbeelding 2014-07-01 om 16 26 02]
https://cloud.githubusercontent.com/assets/3994368/3444165/ac2b9d28-012b-11e4-8f88-948ea64d089f.png
Thus from a 11 font to a 13 font, just I would do with the css file edit.
This is a perfect solution and in my opinion a much better default. The
font of the tab headers and the edit window itself can be set in the
preferences pane and are stored with the workspace, so they are kept with
updating the eclipse Arduino plugin.


Reply to this email directly or view it on GitHub
#156 (comment)
.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@jantje
Copy link
Member

jantje commented Jul 10, 2014

I think this one can be close. Please reopen if I'm wrong.

@jantje jantje closed this as completed Jul 10, 2014
@xaljox
Copy link
Author

xaljox commented Jul 10, 2014

You're right, just remove the line in the ini file and the fonts are decent. The issue started initially since it wasn't possible to set the font size via the css, this has been fixed as well. So there are multiple ways to get decent fonts on the mac.

On 10 Jul 2014, at 02:48, jantje [email protected] wrote:

I think this one can be close. Please reopen if I'm wrong.


Reply to this email directly or view it on GitHub.

@jantje
Copy link
Member

jantje commented Jul 10, 2014

I've added the ini file fix to the FAQ http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.html#Mac_Small_font
Would you mind writing up an FAQ entry/article/paragraph on how to do it via css.

@xaljox
Copy link
Author

xaljox commented Jul 11, 2014

I use the ini file approach, it is a simple fix to to after the download and I’m happy with the font type and size.
But is is perhaps wise to add a few sentences on were to find this file. On the Mac it appears that the application is a file while it is effectively a directory structure. Further note that while there is a standard way to alter the font size of the text editor and some other things, it is not possible to alter the project explorer font size in a „normal” manner in eclipse. The text as it is now suggest that it can be done in a normal manner.

There is a standard eclipse way to change this font but in the product version from 1 july 2014 onwards you can delete following line in the eclipseArduinoIDE.ino.
-Dorg.eclipse.swt.internal.carbon.smallFonts
That will increase the font. a bit
This file is situated inside the eclipseArduinoIDE application, select eclipseArduinoIDE in the folder eclipseArduino right click the mouse and select „Show Package Content” from the popup menu. Next go into the folder Contents and then into folder MacOS in this location the file eclipseArduinoIDE.ini is situated.
An alternative way to alter the font size and may other things, is to edit the file e4_default_mac.css in the folder „eclipseArduino/plugins/or.eclipse.ui.themses_xxxxxx/css. It is advised to download CSS Spy, select the part on the screen of which you want to alter something, pres Shift-Alt-F5, the selected part gets a red border to indicate what was selected and a window pops up with all kinds of CSS related information. Lots of things can be inspected and the relevant CSS class and id are shown. With this information the CSS file can be edited with new entries. Also the new additions to the css file can be tried out on the fly via the CSS scratchpad of CSS Spy, which can be invoked via the keys Shift-Alt-F6. For example to increase the font size of the project explorer one could add the following to the CSS file or put into the scratchpad of CSS Spy.
#org-eclipse-ui-navigator-ProjectExplorer Tree{
font-size: 13;
}
Another way to do something on the appearance of eclipse is to download Jeeyul’s eclipse themes from the eclipse market place.

Op 10 jul. 2014, om 11:52 heeft jantje [email protected] het volgende geschreven:

I've added the ini file fix to the FAQ http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.html#Mac_Small_font
Would you mind writing up an FAQ entry/article/paragraph on how to do it via css.


Reply to this email directly or view it on GitHub.

@jantje
Copy link
Member

jantje commented Jul 11, 2014

I added your description to the faq. txs

@wimjongman
Copy link
Member

maybe we can remove the -D option and describe how to add it if the users
think the font is too big.

On Fri, Jul 11, 2014 at 1:43 PM, jantje [email protected] wrote:

I added your description to the faq. txs


Reply to this email directly or view it on GitHub
#156 (comment)
.

@jantje
Copy link
Member

jantje commented Jul 11, 2014

@wimjongman I considered that to. However as Eclipse thinks this is the way it should be and not so many people complained I think we'd better keep it like default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants