Default text rendering to use subpixel rendering#3937
Merged
swharden merged 3 commits intoScottPlot:mainfrom Jun 13, 2024
bforl:main
Merged
Default text rendering to use subpixel rendering#3937swharden merged 3 commits intoScottPlot:mainfrom bforl:main
swharden merged 3 commits intoScottPlot:mainfrom
bforl:main
Conversation
Member
|
Thanks for tracking this issue down @bforlgreen! It's amazing how less than a pixel of spacing can drive you nuts once you realize it's there 🤪 |
KroMignon
added a commit
to KroMignon/ScottPlot
that referenced
this pull request
Jun 24, 2024
* upstream/main: (317 commits) CI: autoformat Population: new primitive with methods for statistics, testing, and plotting (ScottPlot#3944) Axes: Improve automatic axis limit expansion for extremely large values Default text rendering to use subpixel rendering (ScottPlot#3937) Added LabelFormatter to DateTimeFixedInterval (ScottPlot#3936) Fonts: use a ConcurrentDictionary for typeface caching ScottPlot 5.0.35 SignalXY: Improved cookbook recipe demonstrating SignalXY plots with markers at each point Sandbox: simplify app SignalXY: fix GetRangeY() scaling bug SignalXY: Improve behavior of off-screen single-point signals SignalXY: improve interpolation of edge points when step mode is enabled SignalXY: add scaling and offset to last point DataLogger and DataStreamer: do not manage axes if data is empty CI: autoformat Cookbook: heatmap with custom tick formatter Update Color.cs (ScottPlot#3924) Heatmap: ManualRange CI: autoformat SignalXY: improve behavior of rotated and inverted plots ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that the font spacing between characters was not consistent. This resulted in spacing between characters that almost looks like white space, as can be seen in the image below :
To correct this, there is a property on the skia Paint object that enables subpixel text rendering. Enabling this results in much more consistent spacing between characters.
In the image below, the lines with the '!' at the end have
SubpixelTextset to true.It's very subtle, but notice how they have a consistent 1 pixel gap between the characters?
Where as the ones below (without the '!', with
SubpixelTextset to false) have either a 2 pixel gap, 1 pixel gap or no pixel gap.The cookbook example now also looks better
I have added this property to the
Labelclass with the default being set to true.