Not all fonts are the same pixel size for a given point size and
presumably the user wants the final metrics to match.
Given that now the user can specify preferred fallback font sizes, that
leaves system-fallback fonts, which don't come with size info. Since
java.awt.GraphicsEnvironment.getAllFonts returns a font size of 1, we
scale those fonts up to the main font point size.
So if you know what you're doing, you can set up fonts precisely the way
you like, and if you don't, you can just select the system font fallback
behavior and get the previous outcome.
Submitted | xaphiosis - 2015-08-28 20:18:21.255000 | Assigned | kpouer |
---|---|---|---|
Priority | 5 | Labels | |
Status | pending | Group | |
Resolution | remind |
2015-09-01 22:34:56.773000 xaphiosis |
While testing, I discovered an obscure situation which was not handled properly: when
the font has a transformation assigned to it for some reason (e.g. a plugin deciding
that a certain syntax style should be slanted/squashed/whatever), I was previously
cancelling the transformation during the substitution font derivation as the original
jEdit code did.
0002-Allow-specification-of-sizes-for-fallback-fonts.patch (4.3Kio) |
---|---|
2015-09-02 01:51:01.673000 xaphiosis |
Plugin authors might want to conform to jEdit users' font substitution settings, but
Chunk does not have enough information available. Additionally, as a plugin author
trying to render some text in different colors over/instead of those in a Chunk, a
bit of extra info is needed. We can do font substitution on our own, but when the
user changes the settings, those in Chunk are updated immediately, making it the logical
place to tweak.
0003-Allow-specification-of-sizes-for-fallback-fonts.patch (7.0Kio) |
2016-07-10 20:02:08.073000 ezust |
- **assigned_to**: Dale Anson |
2016-11-21 16:41:07.994000 xaphiosis |
I have used this patch for over a year without problems. I have rebased it onto the version I'm using (r24302) and used it successfully for months after that. If I get a thumbs down, well, so be it, but it's a bit sad when it's been this long without sight of thumbs... |
2017-10-29 23:39:39.772000 ezust |
I am unfamiliar with this code, and I was also not clear on how to test it, so I assigned
it to Dale.
|
2017-10-29 23:39:57.415000 ezust |
- **assigned_to**: Dale Anson --> Alan Ezust |
2017-10-29 23:41:13.701000 ezust |
Will this make things look better on high resolution screens automagically? that would be nice. |
2017-10-30 06:22:09.123000 xaphiosis |
There is no new option in the option pane. It allows you to specify the sizes of the
fallback fonts. For example, let's say your favourite font ever is Consolas, and you
choose a 12pt size for it. Now, does Consolas have symbols for ⦃⦄, for example? Nope.
So you select a fallback font that does have these. The font you select might not
actually *look* the same size as Cambria at 12pt, so you might want to tweak it a
little, making it smaller or bigger. With current jEdit, you cannot make that adjustment,
but with my patch, you can.
jedit_fallback_fonts_2017-10-30_17-13-15.png (26.5Kio) jedit_multifont_symbol_render_2017-10-30_17-19-49.png (21.5Kio) |
2017-11-04 01:44:21.909000 ezust |
- **status**: open --> closed-accepted |
2017-11-04 01:44:22.417000 ezust |
Committed revision 24775.
|
2018-01-10 03:56:09.534000 ezust |
I just discovered that this patch breaks the independent textarea.
|
2018-01-10 03:56:22.727000 ezust |
- **status**: closed-accepted --> pending-remind |
2018-01-11 05:23:16.280000 ezust |
- **assigned_to**: Alan Ezust --> Matthieu Casanova |
2018-01-11 05:23:16.620000 ezust |
Matthieu, can you please fix this or suggest how to fix it in a comment here?
|
2018-01-11 09:19:41.720000 xaphiosis |
My apologies for missing this. I think the way to get around the references to jEdit in Chunk is to pass the information in via constructor. The question that comes to mind is whether Chunk font info is static once created, or whether it is dynamically modified when the user changes font options. I am unfamiliar with how the standalone textarea is intended to be used. |