-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Text] Multiple text processing fixes #15837
[Text] Multiple text processing fixes #15837
Conversation
…nia into feature/fontTableLoading
I don't think the SixLabors code can be used in Avalonia:
We need direct written permission from SixLabors to use their code here I think. |
You can test this PR using the following package version. |
MIT license is compatible with the Apache 2.0 license and the code was taken from a point in time when no dual license existed. We can ask @JimBobSquarePants for permission if you want to clarify things. |
@Gillibald If you copied the code from before the license change a few years ago there is no show-stopper license conflict. Perhaps a date should be noted in the header of the source code to avoid any potential concerns for posterity. (Ported from ... at commit dated While MIT and Apache 2.0 code is usable together the requirements are quite different. I think we need to note in documents that some portions of source code are under a different license. End apps may need to distribute a copy of the Apache 2.0 license as well. Not saying anything of the patent grants and prominant file change notices which Avalonia is now going to have to follow. These complications are why I really, really try to avoid mixing licenses in source code that is side-by-side. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
Not that you need it but you have my blessing. |
For my reported issue I use the ComboBox in the ControlCatalog with individual fonts. Stepping through you can visually see if things are aligned or not. I can take a look later too. Not sure how to unit test this but it probably can be done with text formatter APIs and some carefully chosen font and strings. The font would have to exist on the test PC though so not sure that's a good idea to add at this point. |
You can test this PR using the following package version. |
The left side is somehow stretched vertically |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
I've checked this with the font ComboBox in ControlCatalog: There are some major improvements for sure. It functions better than the alternative implementation here as well: #15344 (comment). I'm still a little suspicious of some fonts though. Courier New for example should likely vertically center, Consolas as well. I'm not sure this is 100% yet but don't know enough about this area to be more specific. |
Hello @Gillibald, Can you re-check with FontStretch property? It not render correctly compare to version 11.0.10. Here is my code to reproduce: <TextBlock FontWeight="Heavy"
FontStretch="Normal"
FontSize="48"
LineHeight="56"
Text="Normal" />
<TextBlock FontWeight="Heavy"
FontStretch="Condensed"
FontSize="48"
LineHeight="56"
Text="Condensed" />
<TextBlock FontWeight="Heavy"
FontStretch="Expanded"
FontSize="48"
LineHeight="56"
Text="Expanded" /> |
What font are you using? I don't think there is any heavy condensed or expanded font face. |
I'm using default font face |
The issue is that in version |
What version will this be officially released in? It doesn't appear to be in 11.1.1 since I still have text rendering issues on fonts like Consolas, but |
This will be part of the next release |
What does the pull request do?
It adds basic font table loading capabilities so we can process the font metadata ourselves without relying on Skia.
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes: #15597