Skip to content
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

patch for openjdk #3

Open
hgomez opened this issue Jan 24, 2014 · 5 comments
Open

patch for openjdk #3

hgomez opened this issue Jan 24, 2014 · 5 comments

Comments

@hgomez
Copy link

hgomez commented Jan 24, 2014

I'm using your patch in Obuildfactory right now (https://github.com/hgomez/obuildfactory/blob/master/openjdk7/linux/patches/fontfix.patch).

Only CentOS 5 have problem with it

https://gist.github.com/hgomez/8594231

It would be nice to get it backported to openjdk and/or Icedtea.

That's why I'm wondering about patch copyright.

Cheers

@Helbrass
Copy link
Owner

This patch is a dirty hack to make NetBeans look pretty, and is not production ready.
The list of issues with this patch:

  • width of glyphs is not properly calculated, and some components (like tooltips) can overflow.
  • some glyphs are hardcoded to request mono type glyphs, and look ugly because of it (again, tooltips)
  • Swing LookAndFeel uses hardcoded font size of 12pt on 72dpi, which means it will be rendered as 9pt on 96dpi monitor. Using proper DPI means that all the Swing applications are using wrong font sizes, usually too small.

So, this patch was never intended to be used on production system, and used only to run Swing-based application that you have to work with (NetBeans in my case).

I have some plans on reimplementing similar functionality for OpenJDK 8, make it as production ready as possible, but don't have enough time for that right now.

@hgomez
Copy link
Author

hgomez commented Jan 24, 2014

Did you take a look at @trustin (Trustin Len) works on your patch ?

https://gist.github.com/trustin/2893461

He told me he's working on this patch and see how to apply for OpenJDK8
May be worth sharing effort ;)

@Helbrass
Copy link
Owner

I see the big difference between applying dirty hack and making a proper implementation, so in my opinion the only worthy effort - full rewrite of font subsystem of OpenJDK8. It is quite a big effort, as I'm not C/C++ programmer and it will be hard for me to rewrite fontScaler.c including proper glyph caching and not to introduce any memory leaks. In addition, inside of Java itself, I will be able to rewrite Metal and probably Nimbus LAF, while GTK and others are beyond my reach, I will probably ask @siasia to help, as he did some work on GTK LAF which I wasn't even able to check.

@hgomez
Copy link
Author

hgomez commented Jan 25, 2014

Yes, a full rewrite of font subsystem will be a serious amount of work.
Did you discuss about this in OpenJDK 8 mailing lists ?

@Helbrass
Copy link
Owner

I did. You can see the discussion here:
http://mail.openjdk.java.net/pipermail/2d-dev/2011-October/002194.html
That's another reason why this patch is supposed to be personal for one single purpose, because it effectively goes against Java specification.

I'm not saying they are wrong, they answered me friendly and with a lot of details, but it just makes me realize that there is no sense in trying very hard to backport my changes to OpenJDK, everyone who wants their fonts to look good in their beloved IDE - they have this patch, everyone else who wants off-screen painting of complex images on server side - better stick to official jre, because there is no mark "officially supported" on this project.

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

No branches or pull requests

2 participants