-
Notifications
You must be signed in to change notification settings - Fork 8.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
Feature Request: Antialiasing mode options #1298
Comments
I think this is a really good idea, and one that @miniksa and I have definitely discussed before. I'd probably want to make the settings values a little clearer than |
https://docs.microsoft.com/en-us/windows/desktop/api/d2d1/ne-d2d1-d2d1_text_antialias_mode
Maybe that's the issue here. It would be nice if we could set the
|
My heart sank the moment I first opened Windows Terminal and witnessed this awful text rendering method that's prevalent in Chromium based applications. (notably Electron based apps) Glad to hear it might get fixed. Is there a scenario in which the blurry rendering is required, or why is it used? Is the clear text not objectively better looking? |
Grayscale rendering is significantly faster than ClearType. You also cannot mix ClearType with alpha blending of the background. This should be offered as a user preference for sure because everyone has their own tastes when it comes to text rendering. |
But IHMO it makes sense to use "GDI classic" rendering mode to disable subpixel positioning (and perhaps a stronger hinting) in this case, especially for a monospace font. |
That might also be a user preference. Maybe someone likes subpixel positioning. Maybe the default should be GDI Classic. To be honest, I haven't thought that hard about this specific topic while standing up the renderer, so it hasn't been addressed. If someone has strong reasons one way or another, I'd love to hear them. Or I'd love to see someone try them out and prove why one beats the other handily. Or offer both as choices. |
Please also consider adding an option to completely disable antialiasing. Not everyone likes soapy text. |
call me crazy, but i think it should by default obey the system-wide settings and if they want to do something different, obey the user's choice |
that could very well be a different font size.
the fact that you ask for a size "10" font doesn't mean anything.
yes, theoretically it does mean *something* and they will claim it refers
to, again, *something*, but if you get an answer to the question "why does
every program render a size 10 font to different sizes, then?", i will
shave my scrotum with a rusty spoon and some tabasco.
…On Thu, Nov 21, 2019, 23:31 GaryO ***@***.***> wrote:
Is this why my Windows Terminal fonts look vertically stretched? I use
Hack, size 10. In Windows Terminal the lowercase "e" is 8 pixels high. In
all other apps (Emacs, WSL terminal etc.), lowercase "e" is 7 pixels high
(and is ClearType-antialiased rather than monochrome). Sample of Windows
Terminal (0.6.2951.0):
[image: image]
<https://user-images.githubusercontent.com/139975/69378273-18d03e00-0c7c-11ea-846c-9dee6cd647e2.png>
Sample of WSL terminal (different theme but same text):
[image: image]
<https://user-images.githubusercontent.com/139975/69378307-24236980-0c7c-11ea-9695-9fa48c226c2b.png>
As you can see, the same font is significantly taller in Windows Terminal.
(The prompt line is also rendered in bold in WSL, but look at the echoed
text -- that's not bold in both samples, so should be comparable.)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1298?email_source=notifications&email_token=AM77DI462LU4ZXLRVUUUYSTQU343XA5CNFSM4HYWYCC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE3W6DQ#issuecomment-557281038>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM77DI3JVXGTAQV7C3WZWI3QU343XANCNFSM4HYWYCCQ>
.
|
Well yes, it's possible of course. I do understand in some detail how Windows TrueType font creation/selection works though; and the fact that these samples have (almost) the same width but different heights suggests to me that something else is at work here. And in every other Windows program I use that font in (OneNote, Word and some web apps, as well as the examples I gave above), it does not come out vertically stretched like that. |
Opened Windows Terminal for the first time today. My first impression was that something is very wrong. Then I realized the text looked awful, as if I need to wear glasses because the text is out of focus. Tried changing font to no avail. :-/ I don't understand the comments above. Did you say that this antialiasing/blur is necessary to allow acrylic backgrounds to work? I hope the text can be made sharp with a better anti aliasing algorithm. Like in notepad.exe, which is rendering crisply antialiased text. I don't think Terminal is supposed to be so blurry in comparison, right? |
No -- ClearType works fine on the acrylic background. The alpha blending only comes into play in the titlebar IIRC (when drawing over the standard titlebar), but I think that should be fine, too, since any area where text is drawn into the titlebar is entirely covered by an opaque background color. You can build the terminal yourself, replace the single use of In the titlebar, it still uses grayscale AA. I haven't looked enough to be able to say if this is because of alpha blending problems, or if that text is drawn differently and doesn't use this AA mode because of that. |
## Summary of the Pull Request I needed to do something to keep sane so today I day of learned about antialiasing. This PR adds the ability to specify the `"antialiasingMode"` as a setting. * "antialiasingMode": "grayscale": the current behavior, `D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE` * "antialiasingMode": "cleartype": use `D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE` instead ## PR Checklist * [x] Closes #1298 * [x] I work here * [ ] I didn't add tests * [x] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments Grayscale: ![image](https://user-images.githubusercontent.com/18356694/75173847-2373f680-56f5-11ea-8896-c1cf04c61d41.png) Cleartype: ![image](https://user-images.githubusercontent.com/18356694/75173854-25d65080-56f5-11ea-9de1-e2d1c343cae5.png) Side-by-side (can you tell which is which?) <!-- grayscale, cleartype --> ![image](https://user-images.githubusercontent.com/18356694/75173864-28d14100-56f5-11ea-8bdd-d47a60fbbe4d.png)
I'm still seeing this when running the very latest terminal 1.0.1401.0 when using Every single profile in I tried:
I'm a little stuck. |
The error still occurs (several relaunches. I also tried setting it individually for each profile): |
@Legorooj, that's not a cleartype error. That screenshot is of the problem in #5759. |
@miniksa thanks for that - somehow I didn't come across that issue or the settings page. Using forced software rendering seems to have fixed the problem. Thanks! |
pixel center offset, texture resize, texturemin/mag filter, texture
compression, glViewport, data type when packing/unpacking pixels, dpi
settings, are some of the things that come to mind. On amd hardware there
is an option in their control panel, "morphological filtering" that may
interfere
i've spent unhealthy amounts of effort and time rendering text as sharp as
possible.
i've concluded that unless you plan on running behind the gpu vendors every
time they change something, the only feasible method is software rendering
with simd, blitting, raster fonts, and dirty rects. In short, the oldest
methods known.
|
Question -- some people turn off the "smooth edge of screen fonts" option available on the "Performance Options", so the fonts look pixeleted but crystal sharp. From what I saw the fonts stay the same with this option turned on or off. Can you please check if this is causing the fonts to look smudge? Take care and awesome terminal you've got there 👍 |
is that still the case? |
Summary of the new feature/enhancement
Support for different text rendering modes, current mode at least for me causes eye strain making new terminal unusable.
Example between terminal (left) and conemu (right):
Proposed technical implementation details
Adding options to
profiles.json
:The text was updated successfully, but these errors were encountered: