This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | I18N - Editor should honor -fontsize or UIManager.getFont ("TextField.font") size for initial font size | ||
---|---|---|---|
Product: | editor | Reporter: | _ tboudreau <tboudreau> |
Component: | -- Other -- | Assignee: | issues@editor <issues> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | gtichy, jf4jbug, kfrank, pfelenda, wendyb |
Priority: | P2 | Keywords: | I18N |
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 33246 |
Description
_ tboudreau
2003-04-25 10:07:18 UTC
Yes, there should be no problem to make this into 4.0. It is also an issue for terminal emulators and non-default fonts. Not all the font mappings are installed, so when I use an XWindow server for remote sessions, the right font is not always available depending on my Windows screen resolution. I specify "-fontsize 10" on the command line but none of the Editors honor it. I just recently noticed that the Editors have their own Font size property, so now i can finally see edited text correctly. (I don't use this configuraton on a regular basis... just for remote testing) It is also inconvenient for non-Java programs where I have to fix the property for each language editor. I would hope all editors will always inherit from the command line when this issue is resolved. (or have a global base editor property like Global KeyBindings) Thanks Wendy Marking as P2 since would need fixing as part of solution for Chinese localization before 4.0 But since marked with FONTSIZE keywd, it will be waived automatically for 3.5/nevada. *** Issue 33876 has been marked as a duplicate of this issue. *** The fix works well until the particular coloring gets modified in the tools->options. Until such change the IDE can be restarted several times with different fontsize parameters and all the colorings will follow the supplied size. In theory I should be able to supply even more advanced fix that could restore adhering to fontsize parameter after the user modifies the size of the font in a particular coloring and then changes the size of the font back so that it matches the fontsize parameter. In such case that coloring would follow the fontsize parameter again. However such fix would be much more complex compared to the fix I'm supplying now and thus more risky. Fixed in maintrunk: Checking in libsrc/org/netbeans/editor/SettingsDefaults.java; /cvs/editor/libsrc/org/netbeans/editor/SettingsDefaults.java,v <-- SettingsDefaults.java new revision: 1.27; previous revision: 1.26 done I would like to ask Mato to review the fix. Thanks in advance. I approve the fix Integrated into [release35]: /cvs/editor/libsrc/org/netbeans/editor/SettingsDefaults.java,v <-- SettingsDefaults.java new revision: 1.26.2.1; previous revision: 1.26 As the editor now reflects the UIManager.getFont ("TextField.font") size for initial font size the default editor font size is now 11 instead of the original 12. I'm not sure whether that's an issue but at least someone from UI team should confirm whether it's OK or not. If the original size 12 should be retained I can e.g. use (UIManager.getFont("TextField.font").getSize() + 1) so the original idea (i.e. make the editor font size bigger for chinese) will still work but the font will be one point bigger. Or I can do e.g. Math.max(UIManager.getFont("TextField.font").getSize(), 12) so the editor font size will be at least 12 even when IDE is started with e.g. -fontsize 10. Interesting, I noticed something looked different when I built the trunk and ran it yesterday, but I couldn't put my finger on what it was. I'd say it depends if the increased font size is a way for the editor to say "look at me, I'm important", it should be +1. If it's just a random artifact, well, if the user can read 11 point type everywhere else without a problem, that's probably true of the editor too (especially since it uses a fixed width font). I specified -fontsize 10, but the Java Editor setting is showing a fontsize of 12. Is this the result of the 12 minimum discussion earlier? or am I not seeing the fix for some reason or another. I know there's been some font related bugs/fixes but I have not been following it. I am using the released version of 3.5. I was preparing to see how the new 3.5.1 rc1 compares. If you are not using a clean user dir, the change probably won't be visible, because a font size setting has been read from disk. AFAIK the patch (assuming Mila did it the way I did the output window) changes the value the font size is initialized with, if it has never been explicitly set. It may be that if the system option has been observed, the observed size is stored to disk. not only was it a clean user dir, I said NB had never been installed on this system before. Is there a file on disk I could look for? I searched *.xml for font and came up empty. This is occurring on VMS. I will try it on Windows. It is the same on Windows. Java Editor is using font size of 12 rather than -fontsize value. I also tried -fontsize 14 in case the minimum of 12 algorithm had been applied. The font size was still 12 in that case too. I also noticed that, besides editors and Javahelp, most but not all parts of the UI adhere to -fontsize. Perhaps the piece being used for this fix is one of the few parts that do not use -fontsize either, or maybe its a timing thing... or ... I have checked NetBeansIDE-release351-200307152351.zip build on Redhat8 and the fix works OK there. Petre, could you please test the fix on Windows too. I'm wondering what could become wrong here. Wendy, are you using just the plain build or are you adding any additional modules? I am using NetBeansIDE-release35.zip. I wanted to see it "fixed" in 3.5 (as reported here) before I tried to see what happened in 3.5.1. fresh download, fresh user dir, no extra modules. Wendy, I think that this was only backported into S1S 5 ML and NB3.5.1 not into the original 3.5. If it's still necessary to use original 3.5 then I would consider to copy the editor module jars from 3.5.1 to 3.5. I have tested it in the current trunk and it should work OK. So I'm closing this as fixed. Please reopen if necessary. I have verified this issue using en and ja locale for editor font size, not font size for non-Java programs and terminal emulators. Changed fontsize 12 to 14 and compaired editor's appearance on following modules. The editor font size is properly resized by -fontsize option. me - build:200401181900 on w2k/sol9(locale ja/en) - OK nb trunk - build:200401151900 on w2k/sol9(locale ja/en) - OK |