Quantcast

[ jEdit-devel ] [jedit:patches] #569 Allow specification of sizes for fallback fonts.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #569 Allow specification of sizes for fallback fonts.

Rafal Kolanski

[patches:#569] Allow specification of sizes for fallback fonts.

Status: open
Group:
Created: Fri Aug 28, 2015 08:18 PM UTC by Rafal Kolanski
Last Updated: Fri Aug 28, 2015 08:18 PM UTC
Owner: nobody
Attachments:

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.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------

--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #569 Allow specification of sizes for fallback fonts.

Rafal Kolanski

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.

This updated version of the patch preserves any transforms applied to fonts when performing code point substitutions.

Attachments:


[patches:#569] Allow specification of sizes for fallback fonts.

Status: open
Group:
Created: Fri Aug 28, 2015 08:18 PM UTC by Rafal Kolanski
Last Updated: Fri Aug 28, 2015 08:18 PM UTC
Owner: nobody
Attachments:

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.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------

--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #569 Allow specification of sizes for fallback fonts.

Rafal Kolanski
In reply to this post by Rafal Kolanski

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.

In order to facilitate this functionality for plugin authors, I have refactored the font lookup (getSubstFont) and derivation (deriveSubstFont) code and made it public, as well as adding a method to check whether font substitution was used in a chunk at all.

I have done thorough testing with glyphs missing in the main font, the user substitution fonts, and the system fonts. I have also checked for sanity when using code points above 0xFFFF. Everything looks good as far as I can see.

This final version contains all the functionality I desired, both as a jEdit user and plugin coder. I am open to discussion, feedback and criticism!

Attachments:


[patches:#569] Allow specification of sizes for fallback fonts.

Status: open
Group:
Created: Fri Aug 28, 2015 08:18 PM UTC by Rafal Kolanski
Last Updated: Tue Sep 01, 2015 10:34 PM UTC
Owner: nobody
Attachments:

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.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #569 Allow specification of sizes for fallback fonts.

Alan Ezust-2
In reply to this post by Rafal Kolanski
  • assigned_to: Dale Anson
  • Group: -->

[patches:#569] Allow specification of sizes for fallback fonts.

Status: open
Group:
Created: Fri Aug 28, 2015 08:18 PM UTC by Rafal Kolanski
Last Updated: Wed Sep 02, 2015 01:51 AM UTC
Owner: Dale Anson
Attachments:

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.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #569 Allow specification of sizes for fallback fonts.

Rafal Kolanski
In reply to this post by Rafal Kolanski

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...


[patches:#569] Allow specification of sizes for fallback fonts.

Status: open
Group:
Created: Fri Aug 28, 2015 08:18 PM UTC by Rafal Kolanski
Last Updated: Sun Jul 10, 2016 08:02 PM UTC
Owner: Dale Anson
Attachments:

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.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------

--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Loading...