Repository navigation
Conversation
Do not convert to/from colors/pixels/ColorStruct_t, just use RGB for calculation of mean background color and for interpolation between backround and text
With TTFhandle::SetSmoothingPrefer() one can enabled/disable global state which define is smoothing should be used. Default is on while all modern displays support enough number of colors. TTFHanlde::fSmoothing has now three states. When state not set before, GetSmoothingPrefer() is used.
Do not force usage of smoothing to let configure custom value via global preference
To be able preconfigure them in the same way as with smoothing. Kerning explicitely used in one place to get text metrics, potentially can be switched on/off from the TLatex Internally use `Tristate` class which handle undefined state for the variable.
In TTFhandle::LayoutGlyphs() set smooth/kern/hint flags if was not defined before. This exclude further interfearance from global state
In such case binary format is just bitmap image which can be plotted directly Make smoothing and not smoothing very similar
Need special bit reversing to support Cairo::Surface::Format::A1 which is differ from TTF source bitmap
Test Results 22 files 22 suites 3d 11h 34m 47s ⏱️ For more details on these failures, see this check. Results for commit 3af38f6. ♻️ This comment has been updated with latest results. |
This branch has not been deployed
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.
There is smoothing parameter in
TTF/TTFhandleclasses.Normally it fixed by platform/display colors depth.
Old static interface provides possibility to change it - but only globally.
Now provide consistent way to configure smoothing/kerning/hinting with
TTFhandleclass.Predefined values are set with static methods like:
When new display is created (TGX11TTF/TGQuartz/TGWin32), depending from colors depth smoothing is enabled or disabled. Normally it is always
ONfor all recent display kinds.When
TTFhandleinstance is created, it has internal three-state parameters for smoothing/hinting/kerning.If parameters not explicitly set in the code (now everywhere the case) - current default values are used.
So one always can switch on/off all three features freely.
Adjust code in
gtk4canvandqt6canvcanvases to correctly display not-smoothed TTF.After this PR one can at any time in ROOT call
TTFhandle::SetSmoothingPrefer(false);to change painting in all canvases.In the future one can add handling of all these three parameters in our
TLatexsyntax.