| Summary: | Orion font is not mono spaced in Linux | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Chris McGee <cbmcgee> | ||||||||||
| Component: | Editor | Assignee: | Silenio Quarti <Silenio_Quarti> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | adrian.aichner, Silenio_Quarti | ||||||||||
| Version: | 3.0 | ||||||||||||
| Target Milestone: | 3.0 RC2 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Chris McGee
It looks like it's org.eclipse.orion.client.ui/web/orion/widgets/themes/editor/ThemeData.js that is setting the default font to "sans-serif." I tried changing it to "monospace" and it seems to work great for me. Has this bug returned with the recent css split? I have not found a way to use a monospaced font via orion settings in firefox nightly on windows. My local orion server is running on linux using latest master branch changes. Will investigate... Created attachment 241902 [details]
it is fine in my Ubuntu 13.10
Which distro are you runing?
(In reply to Silenio Quarti from comment #5) > Created attachment 241902 [details] > it is fine in my Ubuntu 13.10 > > Which distro are you runing? My orion server is running on ubuntu 13.10 from latest git master sources. But this seems to be a client-side issue, right? I usually edit in nightly firefox on Windows XP. There I see the problem. Prompted by your response I investigated more and noticed the font is monospaced in the Orion Editor view in firefox-trunk on the ubuntu system. I noticed major differences in the firefox tools options (windows) and edit preferences (ubuntu). I am able to workaround the problem by tweaking the font settings in firefox on windows, but I would like to understand the issue better. Seems like the monospace font is not used in the editor view since I have to set the default font to Lucida Console to get monospace display in the orion editor. I'll add my attachments of firefox font settings. Created attachment 241906 [details]
font mapping looks generic on ubuntu
Created attachment 241907 [details]
font mapping maps to specific choice on windows xp
Created attachment 241966 [details]
Firefox fonts in my Win7
I do not have a WinXp machine right now to try it out. These are the font settings I have on my Win7 machine. Monospace = Courier New.
The editor font family is set like this: font-family: "Consolas", "Monaco", "Vera Mono", "monospace"; font-size: 10pt; It should choose one of those fonts, if present in your system. Note that monospace is the last one in the list. Do you have either Consolas, Monaco or Vera Mono installed? (In reply to Silenio Quarti from comment #10) > The editor font family is set like this: > > font-family: "Consolas", "Monaco", "Vera Mono", "monospace"; > font-size: 10pt; > > It should choose one of those fonts, if present in your system. Note that > monospace is the last one in the list. Do you have either Consolas, Monaco > or Vera Mono installed? I have none of these insalled. I also tested with firefox nightly started with addons disabled with same results. One think I notices is I get monospace in markdown files for code markup: font-family: monospace; : html.css:500 code -moz-fixed; In an editor for .js I see: font-family: "Consolas","Monaco","Vera Mono","monospace"; : textview.css:1 .textview "Consolas","Monaco","Vera Mono","monospace"; : inline:2 .editorTheme "Consolas","Monaco","Vera Mono","monospace"; : pages.css:9 html Arial,Helvetica,Myriad,Tahoma,clean,sans-serif,Lucida Sans Unicode,Lucida Grande,Verdana; : pages.css:9 body Arial,Helvetica,Myriad,Tahoma,clean,sans-serif,Lucida Sans Unicode,Lucida Grande,Verdana; Both with inspecting element computed styles in firefox nightly. Could this be related to caching issues? I am hesitant to clear my localStorage though. Anything else I should try? Not sure. What change did you make to the FF font settings to work around it? Is "Lucida Console" installed on your system? When I change
.editorTheme {
font-family: "Consolas", "Monaco", "Vera Mono", "monospace";
to
.editorTheme {
font-family: "Consolas", "Monaco", "Vera Mono", monospace;
(removing quotes around monosüace) then I get the monospace font in a JS editor textview in Windows XP nightly firefox.
When I change
.editorTheme {
font-family: "Consolas", "Monaco", "Vera Mono", "monospace";
to
.editorTheme {
font-family: "Consolas", "Monaco", "Vera Mono", monospace;
(removing quotes around monospace) then I get the monospace font in a JS editor textview in Windows XP nightly firefox.
Some doc on the matter: http://stackoverflow.com/questions/7638775/do-i-need-to-wrap-quotes-around-font-family-names-in-css http://www.w3.org/TR/CSS2/fonts.html#font-family-prop It seems quoted strings are valid and required when the name contains whitespaces, but optional otherwise. Looks like a bug in FF, but I will remove the quotes. I wonder if this paragraph of the spec explains the problem: "Font family names that happen to be the same as a keyword value ('inherit', 'serif', 'sans-serif', 'monospace', 'fantasy', and 'cursive') must be quoted to prevent confusion with the keywords with the same names. The keywords 'initial' and 'default' are reserved for future use and must also be quoted when used as font names. UAs must not consider these keywords as matching the '<family-name>' type." (In reply to Silenio Quarti from comment #15) > Some doc on the matter: > > http://stackoverflow.com/questions/7638775/do-i-need-to-wrap-quotes-around- > font-family-names-in-css > > http://www.w3.org/TR/CSS2/fonts.html#font-family-prop > > It seems quoted strings are valid and required when the name contains > whitespaces, but optional otherwise. Looks like a bug in FF, but I will > remove the quotes. > > I wonder if this paragraph of the spec explains the problem: > > "Font family names that happen to be the same as a keyword value ('inherit', > 'serif', 'sans-serif', 'monospace', 'fantasy', and 'cursive') must be quoted > to prevent confusion with the keywords with the same names. The keywords > 'initial' and 'default' are reserved for future use and must also be quoted > when used as font names. UAs must not consider these keywords as matching > the '<family-name>' type." Actually, a bit further up in that document you will find this, which is pretty clear: "Style sheet designers are encouraged to offer a generic font family as a last alternative. Generic font family names are keywords and must NOT be quoted." I was going to say I cannot confirm your fix.
Then I did
localStorage.removeItem("/orion/preferences/local/themes")
and new I can see the editor textview in a nice monospace font of my choice.
Thanks Silenio!
|