snowie2000 / mactype

Better font rendering for Windows.
https://mactype.net
GNU General Public License v3.0
9.75k stars 439 forks source link

MacType INI Development #651

Open sammilucia opened 4 years ago

sammilucia commented 4 years ago

Hi everybody! I hope everyone is staying safe and staying well during the age of COVID−19 that we're all in. With all of us having more time on our hands, I thought I'd post my latest .ini file settings, my customized "Microsoft Sans Serif" font which I've used to replace both Tahoma & micross (Microsoft Sans Serif). My customized font is a duplicate of my glyph-customized SegoeUI font with widths and heights of U&lc being tweaked to provide a more eye-pleasing display on surfaces in the UI that default to Tahoma or micross. The result is a more unified experience across the UI.

My latest tweaks to the .ini file have proven so pleasing across so many different parts of the UI, that I haven't made any changes to it since February 21, 2020 (which is a long time relative to prior attempts). I have a series of steps I go through after each install of the Windows Insiders Fast Ring updates, and so far MacType continues to provide fantastic results (current Windows Insider Build is 19603.1000 released 2020.04.08). These steps are:

(1) Install my customized fonts for SegoeUI and Microsoft Sans Serif in particular.

Thorn Custom Fonts.zip

(2) Run MacWiz to reset the Mode used to "Registry" (I still find this mode to be the best overall way to load and use MacType in my experience, and since it continues to work, I will continue to use it). I also reload/reselect my desired .ini profile (although this appears to be unnecessary since it seems to persist build to build).

ChicoThorn-v1.5.1.0.8.zip

(3) Load my customized font substitutions into the Registry at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

I exported a registry file with my custom settings a while back, so now after each build I just run that registry file to update Font Substituions more quickly.

Thorn Custom Registry Font Subs.zip

(4) I double-check my scaling options in Windows Settings — Settings > Display > Scaling and layout = 100% (this setting persists build to build) Settings > Ease of Access > Make text bigger = 113% (this setting also persists build to build). I've found that these scaling settings work really well for a number of reasons. First off the 100% scaling makes older .exe apps continue to function properly (case in point is Microsoft Keyboard Layout Creator, which I use to change my keyboard layout to accomodate my customized glyphs. If the scaling is set to anything other than 100% this app no longer displays properly and becomes unusable). The 113% "Make text bigger" setting enlarge most of the Directwrite renderings in the UI (at least I think it's Directwrite, that all gets so confusing to me), including the Taskbar Jumplists, Action Center flyout, the Start Menu, UWP apps, Chromium Edge Canary and others).

(5) I use WinAero Tweaker to change the default font size of Icons from 9pt to 10pt (which also changes the sizes of all filename text displays in File Explorer). 10pt scaling of the Icons and filenames nearly matches perfectly the 113% scaling produced by the Ease of Access setting, thus providing a very uniform overall look and feel within the UI. Here's a link to WinAero for the download (scroll down past the adds for the download link) — Note: When you install WinAero Tweaker Windows will pop up a security warning that it's 'dangerous.' It is not. I have been using Tweaker for over five years with no problems. Sergey Tkachenko is the sole programmer with a small operation. The software is safe and reliable. https://winaero.com/download.php?view.1796 Here is the install files for WinAero Tweaker:

winaerotweaker.zip

(6) I make sure my monitor is adjusted and calibrated properly. — This one is important. It makes a HUGE difference in overall font display quality if monitor gamma, brightness, and contrast are improperly set. This took a little trial and error; but using calibration software (and my own eye) to adjust the overall look I was able to come up with very pleasing results. I imagine these settings would differ from monitor to monitor and brand to brand. For me these monitor settings are (input through the onboard settings of the monitor itself): Brightness=85; Contrast=75; Gamma=Medium. I also adjust the Nvidia Control Panel settings to a vibrancy level of 60%. All of these display/monitor settings have a big impact on display ultimately.

Finally, here are a few screenshots of my current setup at this time:

Screenshot Samples.zip

Edge Canary, Taskbar Jumplist, Action Center sample: Canary Jumplist ActionCenter

Custom MS Sans Serif Font UI samples: Custom MS Sans Serif Font Examples

Custom MS Sans Serif Font Examples-2

File Explorer, Taskbar Jumplist, Settings samples: File Explorer Settings

Light Mode samples: Light File Explorer Jumplist ActionCenter

Light File Explorer Settings


Thanks for all your hard work on MacType @snowie2000 and @sammilucia ! MacType continues to be the most important add-on to my PC and makes my everyday work so much more pleasurable and tolerable. I'm looking forward to helping out in the future as you develop new versions! Stay well everyone! 😊

Originally posted by @ChicoThorn in https://github.com/snowie2000/mactype/issues/553#issuecomment-612683662

sammilucia commented 3 years ago

@snowie2000 this is using the latest MacType64.Core.dll and MacType64.dll you posted several weeks ago - I've had no problem with either 😊

ChicoThorn commented 3 years ago

I've disabled Font Substitutions because I prefer my own - I think when we bundle this with the next build of MacType we should probably disable them too

Hi @sammilucia ! That's great to hear! I am honored! 😊 Your screenshot looks fantastic! — Yes, I agree the font subs should be stripped out (or disabled) for the release to general users. I'm working on some more fine-tuning but it's so close between one and the other sometimes it's hard to tell which is which, lol! I will upload those soon if any of them pan out. But so far I think this latest one (that you're using, ChicoThorn· v1.5.1.2.5) is the best! You mentioned the "Linux smoothness" — I don't run Linux, but if you could send me a 100% screenshot of a sample of what their text looks like maybe I can tweak an ini file that matches it! 😀 It'd definitely be worth a try!

taprobane99 commented 3 years ago

I am happy to post some Linux screenshots if you give me a list of fonts and font sizes you want.

ChicoThorn commented 3 years ago

I am happy to post some Linux screenshots if you give me a list of fonts and font sizes you want.

Thanks @taprobane99! That'd be great! I doubt if Linux uses Segoe UI, but if that's available that'd be nice... Or Helvetica, or any other standard Sans Serif Linux makes use of. Since I'm not really familiar with that OS, how about I leave any other standard-type fonts up to your discretion. Probably be good to include a fairly common serif font as well. Sizes: 9pt, 10pt, 11pt, 12pt in particular. Please be sure to upload a .zip file of all the screenshots, just posting them here on github alters their clarity and I can't get a good "read" on the fonts if the screenshot is not 100% crisp and clear. — Thanks! 😀

taprobane99 commented 3 years ago

I attach a zip of Segoe UI 15 pt, Lato 15 pt, and Constantia 17 pt from a Firefox page. I have cleartype RGB-ordered subpixel AA with light (vertical) hinting and the default 5-tap beveled filter enabled, and also sub-pixel positioning turned on. This is basically the out-of-the-box experience with Freetype 2.10.4.

(the Heading word 'History' is in Georgia font in all 3 screenshots)

Obviously, if you zoom in to about 600% you can see how it has chosen the individual pixel colors.

Constantia:

Constantia

Lato:

Lato

Segoe UI:

SegoeUI

LinuxCleartypeAA.zip

ChicoThorn commented 3 years ago

Hi Everybody!

Hope everyone's hanging in there! I've had more time with the latest round of Covid lockdowns so I've been doing some experimenting with my ini file and discovered something new (at least to me!). I 'discovered' the Text Tuning RGB settings! I had pretty much just ignored them before, but this time those settings caught my eye. So I started experimenting... To see what effect it might have on the rendering I set each of the RGB values first to zero (=0). The result was glyph rendering that was muddy and thick. Next, I set the RGB values to ten (=10). The result this time was extremely thin glyph rendering. I realized I had found another way to affect the clarity of the type. I set out to see how manipulating these values in conjunction with the gamma, contrast, and weight values would affect the overall rendering. I pretty much started from scratch, so some of the settings are quite different from what I’ve done before. I'm really amazed at how much sharper the glyph rendering is now! In Light Mode the text is darker, crisper, more robust. In Dark Mode the text is much crisper and bright, yet still with well defined glyphs and not too much fuzziness. To compliment these new settings I also tweaked the DirectWrite parameters a bit to better match. Overall, I think these new settings work best in all the various UI situations so far to date! 😊

I've attached a .zip file with the following ini files:

ChicoThorn Clear UI =   Version 1.6.0.0.0   The newest version. Renders best across all UI environments
ChicoThorn Clear UI+FS  =   Version 1.6.0.0.0   Identical to above except it contains all my custom Font Substitutes
ChicoThorn Clean    =   Version 1.5.1.2.7   The last .ini I uploaded a few weeks ago
ChicoThorn Soft     =   Version 1.0     The original ChicoThorn ini from 2019.06.21 - MacType beta6 

Let me know how the newest ini (either of the two v1.6.0.0.0 ini's) works for you in your own desktop environment! 😀

Also attached are several screenshots in both Dark and Light Modes.

Stay well everybody, and HAPPY HOLIDAYS! ✨❤

—Thorn

ChicoThorn ini's.zip

2020.12.10 Screenshots.zip

2020 12 10 D1 2020 12 10 D3 2020 12 10 D6 2020 12 10 L6 2020 12 10 L1 2020 12 10 L3

taprobane99 commented 3 years ago

Hi,

Looks better with 1.6. Previously I did not really notice that much with your changes in versions, but this seems to be a step up. I feel like it is just the right side of everything being too dark and contrasty. However, still:

Probably, most of this is down to the limitations of Windows. In Linux you can really tell the difference in "character" between various fonts, and I will often download ones I come across that look especially nice on a new website. For example, compare Gentium Book Basic (https://fonts.google.com/specimen/Gentium+Book+Basic) to your standard Serif fonts (Times, Constantia). On Linux they look very different, on Windows they look very similar!

Also, does anyone know if there is a toggle for forcing sub-pixel positioning in Windows? This is distinct from sub-pixel anti-aliasing, and basically means that the spacing between letters is calculated at a sub-pixel resolution. So, for example, the word "Application" has even spacing between letters rather than "Ap.plic.ati.on". Look at the version properties dialog for Notepad for a good example of this artifact.

ChicoThorn commented 3 years ago

Hi Everybody! Well, I just can't leave it alone — I dove into the DirectWrite settings this time... I just wasn't happy with how sketchy the gray text on the Settings page was rendering. What I discovered is that the higher the contrast number the darker Light Mode rendering gets. After some experimentation I discovered that in light mode the contrast setting shows a measurable difference between increments, 0.8 and 0.9 for example; but in Dark Mode those same values show no measurable difference. I thought that was a bit odd, but in a way it made it easier to just go for the best look in Light Mode knowing that Dark Mode would remain the same. The only change then, is the DirectWrite contrast setting, which I set to 1. I experimented with several DirectWrite gamma settings as well, but found 1.9 to still be the best overall. I've made this edit in the two versions named ChicoThorn Clear UI. The 'Clean' and 'Soft' versions are as they were before. Attached are new screenshots (particularly check out the Light Mode, especially the Jumplist and the Settings page), and the updated ChicoThorn ini files. 😀

ChicoThorn ini's.zip

Screenshots.zip

Also, does anyone know if there is a toggle for forcing sub-pixel positioning in Windows? Hi @taprobane99 — I don't know if this will help, but FontCreator has a Smoothing dialog where one can customize values and select from a combination of several smoothing schemes available in Windows. I've attached a screenshot.

FontCreator Smoothing Dialog

  • "Spidery" at small font sizes I've been using these settings with a System scaling set at 125%, but check it out, File Explorer's ribbon uses smaller text than elsewhere on its windows and as you can see from the screenshots even those smaller sizes render well. But the big tell is in Photoshop (CS3) where the pallets, dialogs use a very small type. You'll notice that even at that small size it's crisp and clear.

Examples of Small Text.zip

Example of Smaller Explorer Text

Example of Smallest Text PS3

Here are some of the Screenshots from my updated ini settings —

2020 12 10 L2

2020 12 10 D2

2020 12 10 L3

2020 12 10 D3

2020 12 10 L7

2020 12 10 D7

That's it! Let me know what you think and how it works on your PC! 😊

taprobane99 commented 3 years ago

Hi,

I managed to solve the letter spacing issue and some of the "spideryness" by one simple change to the latest Clear UI. I turned off font hinting (and hinting below 9pt). I think that cleartype does do sub-pixel spacing but hinting takes priority if on.

The problem is that very few fonts are internally hinted, as this requires a lot of manual effort. To my knowledge only Segoe UI, Verdana, and Tahoma are hand hinted to a high quality. Also, that effort was made for very low resolution CRTs and early LCDs. Using a modern LCD with >90 dpi, and 125% scaling, so effectively >110 dpi it is not necessary.

Also, from a previous question I asked to the author of this program, any fonts with no internal hints are in fact auto-hinted when using the "internal hinting" setting. Therefore that setting is quite disastrous for any modern fonts, such as Google web fonts, which are used all over the web. Most news websites have their own font for example.

With font hinting completely off, everything looks better to me, and I am also not using any font substitutions, as modern fonts look great too.

So I would suggest creating a preset that is tuned with hinting off, as that will be more flexible for most users. You could still substitute any pre-cleartype era fonts such as Times New Roman, Arial, maybe Helvetica, as there are better modern alternatives.

taprobane99 commented 3 years ago

I'm going to have to add a significant caveat to the above comment. Whilst turning off hinting looks amazing in modern WPF apps, it gives ugly spacing issues in older GDI apps because they always relied on hinting as a hack to get the spacing fairly even.

This is a shame, and needs investigating further. There must be some combination of hinting settings that doesn't destroy the character of fonts, or requires us to use SEGOE UI everywhere!

Look at the sub-pixel positioning section here for more info:

https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/cleartype-overview?view=netframeworkdesktop-4.8

(are we allowed to make GDI-only settings in the ini?)

ChicoThorn commented 3 years ago

This is a shame, and needs investigating further. There must be some combination of hinting settings that doesn't destroy the character of fonts, or requires us to use SEGOE UI everywhere!

I know what you mean @taprobane99. I've always wondered why Microsoft hasn't either just fixed the spacing on the older fonts still in use in the UI (Tahoma, Microsoft Sans Serif, and Arial), or just consolidated all of them so only one font is used, Segoe UI. I personally like Segoe UI, and as a publication designer I've always thought a unified font throughout is the most pleasing to the eye. — To circumvent Microsoft's use of old outdated, poorly spaced fonts I hacked my own version of Segoe UI using FontCreator. Basically I studied the parameters of Tahoma and Arial and stretched and altered a copy of Segoe UI to match that appearance through much time-consuming trial and error. Then I merely changed the internal font name of my hacked font to Microsoft Sans Serif, but renamed the Explorer filename to "Segue MS" (the filename could be anything really just so long as its different from any of the default font filenames). Then I setup my Font Substitutions accordingly both in the registry with RegEdit and in MacType. My font hacking attempt is probably about 90% on the mark, but there's some more tweaking I can do to make it even better. But even still it looks way better IMHO than those poorly spaced, poorly rendered fonts Microsoft still insists on using. One of these days I'll get to finishing that up. It's also my goal to create a Segue MS version that has the default character set (without my Custom symbol glyphs I added in), so others can use it too. When I do I'll be sure to post a copy here.😉

taprobane99 commented 3 years ago

So my previous post was a bit of a false alarm. The one app which has spacing issues is actually independent of any settings in Mactype. I think it's using java to render or some odd thing like that. Everything else looks great. Can you test how everything looks on your system with hinting off?

The thing is that the font world has also moved on from Segoe and the cleartype family (Calibri etc.). Don't forget that was the era when1024x768 pixels was standard! Nowadays modern fonts like Roboto, Lato, Noto look best on most modern displays with no hinting.

ChicoThorn commented 3 years ago

Can you test how everything looks on your system with hinting off?

Yes! I did check that out right after I saw your post... When I turned off both of the hinting schemes in MacType all my text looked out of phase; out of alignment with the pixel grid. I guess that makes sense since that's what hinting is supposed to help correct. Also the ascender of tall glyphs, caps, and numerals were blurry/fuzzy. So I switched my settings back so hinting was turned on, and it was all good again. I'm sort'a guessing that this kind of fine tuning (experimenting with what works best in our own PC environment) is par for the course, and will differ somewhat from user to user. 🙂

taprobane99 commented 3 years ago

I think I recall somewhere that you use a 27 inch 1080p screen? That's only 80 dpi which is actually low by modern standards and would explain why hinting benefits you.

Personally I use 24 inch 1080p and 1440p screens which are 94 dpi and 122 dpi respectively. The general rule of thumb is that hinting is not needed > 100 dpi, however 125% scaling buys you a bit more sharpness then your physical pixel density. Certainly, for me, fonts look better without on both of my monitors.

snowie2000 commented 3 years ago

GDI can't do any subpixel positioning as demonstrated below: GDI: gdi DirectWrite: dw

Any GDI API call only gives you integer values of glyph width and position and others. It's meaningless to use information from freetype to position the glyphs because once you select any texts, the selection part is redrawn from its left border which is also an integer value, and there is no way to correctly retrieve its previously assigned subpixel position.

The long-exist spacing problem still exists when font hinting is off. It's just less noticeable.

taprobane99 commented 3 years ago

@snowie2000 So if I read your comment correctly, in GDI apps hinting makes the font spacing problem worse?

Here are some screenshots of the GDI? app with poor spacing (regardless of mactype settings):

Screenshot_20201216_151755 Screenshot_20201216_151830

And here is some beautiful evenly spaced text in Notepad (WPF?) with hinting and kerning off (Consolas font):

Screenshot_20201216_151949
taprobane99 commented 3 years ago

@ChicoThorn, which Web Browser do you use and with which settings? Your preset seems to strike the right balance on all the UI elements and programs like Notepad, but I find that with browsers in GDI mode everything renders too thick/constrasty, and those in Directwrite mode too thin.

snowie2000 commented 3 years ago

@snowie2000 So if I read your comment correctly, in GDI apps hinting makes the font spacing problem worse?

Here are some screenshots of the GDI? app with poor spacing (regardless of mactype settings):

Screenshot_20201216_151755 Screenshot_20201216_151830

And here is some beautiful evenly spaced text in Notepad (WPF?) with hinting and kerning off (Consolas font):

Screenshot_20201216_151949

If you look at the first pixels of every character, they are all in red, meaning there is no subpixel positioning happened in your case. The reason why the second one looks so much better is that the consolas font you're using is a monospace font, which means every character has the same width, they will never overlap or even close to each other.

taprobane99 commented 3 years ago

I should have spotted that! When I change notepad to a non-fixed space font at small pt size the uneven spacing appears again.

On the topic of web browsers I finally found settings for beautiful fonts:

1) Use Opera. I tried various chrome-based browsers and firefox, with many different flags and reg settings but could never get text as good as Opera. The only flag I have set on Opera is Accelerated 2D canvas disabled, but this could be skipped if you have a good GPU.

2) Use directwrite rendering mode = 6 in Mactype. This is defined by Microsoft as:

_For rendering at large sizes, an application developer might prefer to render by using the font outline rather than by rasterizing into a bitmap. The application sets the renderingMode parameter to DWRITE_RENDERING_MODEOUTLINE to specify that rendering should bypass the rasterizer and use the outlines directly.

It seems the less you allow directwrite to manipulate the glyphs the nicer they look!

3) Use the Stylus extension and add this subtle emboldening as a new .css script:

html, body { -webkit-text-stroke-width: 0.005em !important; }

Now, text is still not perfect because I think chromium-based browsers have a fixed gamma value which is slightly too light. But it's getting close to the quality on Linux. Also I suspect that Opera is compiled to allow directwrite mode 6, whereas other chromium-based browsers don't allow it.

ChicoThorn commented 3 years ago

which Web Browser do you use and with which settings?

@taprobane99 — I use Edge Canary — the "nightly" build of the new Microsoft Chromium Edge — Version 89.0.742.0 (Official build) canary (64-bit) as of 2020.12.22. — In Canary settings I have all the sans-serif fonts set to Segoe UI, the serif font set to DejuVu Serif, and the monospaced font set to DejuVu Sans Mono. See the screenshot below.

Edge Canary Font Settings

UPDATE on newest ini: I've been working on coming up with ini settings tuned for three popular text scaling sizes, 100%, 115%, and 125%. I used the settings from the last 1.6 settings I posted a few days ago and tweaked them just a bit for improved appearance at the specified scaling. I'm not quite ready to post all of them yet though, still fine-tuning... although I'm really happy with the settings for 125% (even clearer and better than earlier versions) and include it here for you try.

ChicoThorn ini's - 125%.zip

2020.12.22 - s125% - Screenshots.zip

You're right about my monitor resolution being coarse at smaller scale settings. At 100% I've gotten it nearly perfect in the Sys32 ClearType settings, but the DirectWrite settings look blotchy and uneven with my monitor. At 115% text scaling (which is really 113%) DirectWrite is better, but still uneven. I'm guessing 100% & 115% would look much better on a higher resolution monitor. @taprobane99 which brand monitors are you using? And do you recommend any 2K or even 4K PC monitors?

P.S. I'm leaving the build number of my new ChicoThorn Clear UI ini files at 1.6.0.0.0 because I want to nail down this new approach to that version number for inclusion with the MacType release download. However, you can easily tell which 1.6 you're using by looking at by the date in the header of the ini. 😊

2020 12 22 D1 - s125%

2020 12 22 D2 - s125%

2020 12 22 L1 - s125%

2020 12 22 L2 - s125%

ChicoThorn commented 3 years ago

2. Use directwrite rendering mode = 6 in Mactype.

This is interesting! I'll check it out , thanks! 🙂

ChicoThorn commented 3 years ago

So I gave it a go and found that with the rendering mode set to 6 all my DirectWrite text (within the browser as well) becomes fuzzy, sketchy, and poorly rendered. Here are a couple screenshots to show you what I mean...

2020.12.22 D1 RM6 - s125%.zip

2020 12 22 L1 RM6 - s125%

2020 12 22 D1 RM6 - s125%

taprobane99 commented 3 years ago

I suspect that's your monitor. The various gridfitting techniques do work well on lower dpi screens.

I strongly recommend the Dell P2421D which is 2K and 122dpi. I am still waiting for 4K monitors to develop as many of the current ones have poor contrast ratios or are too large. I find 24 inches the ideal size to use without rotating my head.

I am not the first person to use rendering mode 6. In fact, the Mactype default .ini also uses it. I believe it is also good for Chinese fonts as no glyph distortion is even more important there.

ChicoThorn commented 3 years ago

I strongly recommend the Dell P2421D which is 2K and 122dpi

I'll check it out! Thank you! 🙂

MarkDraconian commented 3 years ago

I'm using the latest preset (1.6) with my Frankenstein pc(old TN 18.5 Samsung monitor, AMD VSR 1080p to 768p, and a active HDMI to VGA converter) and fonts looks so good now at 125% scaling! Even with small fonts i can read those much better now. Thanks!!!

ChicoThorn commented 3 years ago

i can read those much better now. Thanks!!!

Thanks @MarkDraconian ! I've been tinkering some more and have recently come up with these settings. I think they're even more robust both in Dark and Light modes! Give it a try and let me know what you think! 😊

2020.12.30 - UPDATE: I've included all of the ChicoThorn ini's in this updated zip file. I also changed the date-stamp to 2020.12.30.

The ChicoThorn Clear UI settings are truly my best yet. I've been using it now for a few days and with very few exceptions it looks really clear and crisp (especially at 125%) across the entire UI and on the web. Occasionally I'll see a dialog or window with extremely thin scratchy-looking rendering, but it's been so rare, I can't even remember which window I caught that in. I've also included some updated screenshots. 😄

Hope everyone enjoyed the Holidays, and that you all have a wonderful New Year!! 🎇✨🎇

2020.12.30 - ChicoThorn Ini's.zip

2020.12.30 - Screenshots s125%.zip

2020 12 30 D1 - s125%

2020 12 30 D2 - s125%

2020 12 30 D3 - s125%

2020 12 30 D4 - s125%

2020 12 30 D5 - s125%

2020 12 30 L1 - s125%

2020 12 30 L2 - s125%

2020 12 30 L3 - s125%

2020 12 30 L4 - s125%

VladWinner commented 3 years ago

I've included all of the ChicoThorn ini's in this updated zip file. I also changed the date-stamp to 2020.12.30.

Hello! What do you think about such additions to one of your .ini? ChicoThorn Clear UI+FS_v2.zip I also want to note that in some applications, font substitutions change the actual glyph size, and in this regard, you can use other metric-compatible [external] fonts: image image

ChicoThorn commented 3 years ago

you can use other metric-compatible [external] fonts:

That's awesome! I've experimented around in the past with alternate fonts with some measure of luck... but I finally just created my own font which I use in place of Arial and Tahoma (my font is a metrically altered version of SegoeUI). But I like what you're showing there! I'm going to give it go and see how it looks! 😊

VladWinner commented 3 years ago

But I like what you're showing there! I'm going to give it go and see how it looks! 😊

@ChicoThorn Great! I use a modified version of the Inter font (with alternative ligatures for high readability/legibility /ss01,ss02,ss03/ by default + glyphs size is reduced by 5% manually) to replace Arial in web browsers. Inter modified (InterAlt).zip Unfortunately, replacing this font with modified Inter (I named it as InterAlt) via MacType does not work everywhere as it should (there are problems in Microsoft Edge, for example). image At the same time, the replacement with Segoe UI occurs without problems, so maybe the reason is the incorrect font modification. However, on my Android smartphone, "InterAlt" globally replaces the stock Roboto font family and does not create problems in any mobile apps.

taprobane99 commented 3 years ago

Sorry I find this need for metrically-compatible fonts puzzling. Most of them are used on Linux to get around various copyright issues in distribution, or for purists who don't want any Microsoft products on their system. Having tried some of them, they are almost all poor copies of the original. I don't get why they would be useful on Windows.

The one exception is Gelasio, metric compatible with Georgia. Better than Georgia in my opinion. But even the designer of that admits he has been constrained by the glyph matching.

Why not check out Microsoft fonts like Arial Nova, Verdana Pro, Georgia Pro, which are improved versions of the originals with better kerning, spacing etc? I have subbed Arial for Arial Nova and it looks nice with Mactype. It works well on the Google homepage. Most other fonts I go for something entirely different and have never had any issues (e.g. Raleway for Verdana).

VladWinner commented 3 years ago

I don't get why they would be useful on Windows.

The main problem is that such fonts still have poor-quality Cyrillic glyphs (or do not contain Cyrillic glyphs at all). Gelasio font from your example also doesn't contain this character set. In addition, in most of these fonts, there is even no Ruble sign and adequate arrangement of acute accent over Cyrillic vowels, although visually most of this letters looks pretty similar to Latin alphabet. image Also, current situation with legal prohibitions and licensing in Russia does not allow you to legally embed Microsoft fonts in documents, according to news reports. We already have fallback option with metrically compatible with Times New Roman font (PT Astra Serif), which looks more modern than Microsoft's TNR and offers a better Cyrillic alphabet. Although we need in new state standards with modern TNR analogues like PT Serif (which does not try to repeat TNR font metrics). I prefer such alternatives to popular fonts:

ChicoThorn commented 3 years ago

Hi everybody! The quest continues for the 'one true ini' to rule them all, lol! 😜😂 Once again I spent some time in DirectWrite adjusting, readjusting, over- and under-adjusting... I found that my 2020.12.30 DirectWrite attempt worked in most environments, but was a bit thick and overly klunky in some UWP dialogs (such as the UAC approval dialog), and in some others it was thin and sketchy (as in the Settings page on Edge Canary browser).

The DirectWrite settings have always been a bit of challenge to get right. I've found that for the same ini to work well in both Dark and Light modes the contrast has to be high enough so in Light Mode the gray subtext on the Windows Settings home page appears fully formed and not broken up or sketchy, but low enough so that in Dark Mode the same text doesn't get blown out. But the higher the contrast also means a higher gamma setting as well. Throw into the mix the various different ways DW is rendered in different parts of the UI and it really becomes a balancing act. — So my goal was to create 'middle-ground' DW settings that would satisfy both modes across the many rendering surfaces. I think this latest version does just that. It's clean and clear in the Taskbar Jumplists, the UWP apps (Settings, Start, Calendar, etc.), Edge Canary (even the settings page!), the desktop context menu, dialogs, and all other UI surfaces I've tested so far.

I've also tweaked the Sys32 ClearType ini settings a bit more as well. Changes: NormalWeight=14 ; BoldWeight=4 ; TextTuning (RGB all)=5. —— 'ChicoThorn Soft' & 'ChicoThorn Clean' were not changed, but are included in the .zip anyway.

I've included the updated ini's and some screen samples of this latest endeavor in the .zip files below (ChicoThorn Clear UI date stamp: 2021.01.05-14Û30) 😊

ChicoThorn ini's - 2021.01.05-14Û30.zip

ChicoThorn Screenshots· 2021.01.05-14Û30.zip

ChicoThorn Clear UI (D g2 c1 4 ct0)

ChicoThorn Clear UI (D2 g2 c1 4 ct0)

ChicoThorn Clear UI (D4 g2 c1 4 ct0)

ChicoThorn Clear UI (D5 g2 c1 4 ct0)

ChicoThorn Clear UI (L g2 c1 4 ct0)

ChicoThorn Clear UI (L2 g2 c1 4 ct0)

ChicoThorn Clear UI (L4 g2 c1 4 ct0)

ChicoThorn Clear UI (L5 g2 c1 4 ct0)

MarkDraconian commented 3 years ago

This last one looks really good even in my native resolution and 100% scaling. Thanks!

taprobane99 commented 3 years ago

For me, the one from 14th December is the best.

taprobane99 commented 3 years ago

Also, perhaps it is an idea not to use the Windows Settings page to optimise fonts. I have to be honest, on my system, it has looked terrible under every single .ini I have tried. It must use some strange rendering technique.

On the other hand, Libreoffice 7 with Skia off looks amazing with the Dec Chicothorn preset.

ChicoThorn commented 3 years ago

Also, perhaps it is an idea not to use the Windows Settings page to optimise fonts. I have to be honest, on my system, it has looked terrible under every single .ini I have tried. It must use some strange rendering technique.

On the other hand, Libreoffice 7 with Skia off looks amazing with the Dec ChicoThorn preset.

I agree! My settings page always looked bad too, but this last time I noticed it was a lot better, lol! So I thought I'd toss it into the samples. And yes! LibreOffice 7 is great with Skia off! 🙂

ChicoThorn commented 3 years ago

I made two versions of my latest ini... one has the RGB settings at 5 (thinner look) and the other at 4 (a bit heavier). I like 'em both, but I think the RGB set to 4 more closely matches the other rendering weights used in DirectWrite and elsewhere. 🙂

ChicoThorn Clear UI v1.6 - 125%· RGBs.zip

taprobane99 commented 3 years ago

What are good programs to test the DirectWrite gamma, contrast, and cleartype level?

On my internet browser (Opera) these have no effect. Only the DW mode can be changed.

sammilucia commented 3 years ago

What are good programs to test the DirectWrite gamma, contrast, and cleartype level?

I don't know that they are any. one of the problems with DW is that any software can configure it differently, so many applications look different. this is a horrible design decision from MS.

i don't actually know if MacType can force the same settings in all apps? @snowie2000 ?

sammilucia commented 3 years ago

oopsies hit wrong button 😜

taprobane99 commented 3 years ago

So I played around quite a lot with Snip&Sketch, Calculator, Word 2016, and the Settings page. It seems:

DWR Gamma Level: Start at 2.2 and then lower until text starts looking too bold. 1.9 was great for me. Cleartype Level: Seems to have no effect! Contrast: This is the parameter I like the least. Anywhere above 1 distorts the font glyphs in quite bad and uneven ways.

This is probably why ChicoThorn's Dec 14th preset with 1.9 and 1 (Gamma/Contrast) was best for me.

Also, there is a possibility that each windows update is altering the way DW behaves. I am running build 20H2.

ChicoThorn commented 3 years ago

Cleartype Level: Seems to have no effect! Contrast: This is the parameter I like the least. Anywhere above 1 distorts the font glyphs in quite bad and uneven ways.

This is probably why ChicoThorn's Dec 14th preset with 1.9 and 1 (Gamma/Contrast) was best for me.

@taprobane99 I had pretty much the same experience and came to similar conclusions in my experimentation as well. Cleartype level doesn't do anything by my measurements. Contrast is problematic and inconsistent, although there seems to be some correlation between it and the gamma settings. I've been able to produce almost exactly the same result using completely different settings. I've attached a couple here for you to check out. One set (Dark and Light Modes) is with DirectWrite set to gamma=2, contrast=1.4. The other is set to gamma=1.9, contrast is disabled (;contrast=0). The results are very similar to each other.

ChicoThorn ClearUI-v1.6 Contrast Comparison.zip

This suggested to me that there is some dynamic relationship between the gamma and contrast settings that can be tweaked either at a high range or a low range and still get very similar results. To test that I tried some extreme settings, gamma=4, contrast =3 and I was surprised how with just a bit of tweaking I could get them to a reasonable level of okayness. Although after quite a few tests I found that using as low a setting as possible seemed to provide the best overall results... which I think is what you were pointing out @taprobane99 about the lower gamma and contrast settings (1.9 and 1) working so well for you. I've been using the version with the gamma at 1.9 and contrast disabled (;contrast=0) settings all day, and it really renders well! 😊 Here's the two ChicoThorn Clear UI ini's with those settings:

ChicoThorn Clear UI ini's - 2021.01.07-20Û40.zip

Also, there is a possibility that each windows update is altering the way DW behaves. I am running build 20H2.

I'm a Windows Insider in the development branch and usually get a new build update about once a week. Right now we're working on the first build (21227) in what will eventually be 21H1. And I've often noticed a change in the text rendering after a build update. It's so subtle that I've often thought it was just my eyes. But it's interesting you've noticed something too, so maybe there is something to that? 🤷

one of the problems with DW is that any software can configure it differently, so many applications look different.

I wondered about that too! That's crazy! I wonder why Microsoft would do that? I like your idea @sammilucia of possibly giving MacType the ability to override and force its own settings. I was wondering too if there is a way to add more settings that will allow us to be able to fine-tune DirectWrite settings better.

ChicoThorn ClearUI-v1 6 (D g1 9 ;c ct0) ChicoThorn ClearUI-v1 6 (D g2 c1 4 ct0)

ChicoThorn ClearUI-v1 6 (L g1 9 ;c ct0) ChicoThorn ClearUI-v1 6 (L g2 c1 4 ct0)

taprobane99 commented 3 years ago

I found DW contrast of 0 noticeably worse than 1. Played around again but didn't find anything better than gamma 1.9, contrast 1.

I would be interested to know if the contrast values are a Mactype invention or if they actually correspond to any control that Microsoft use. Surely it must be documented somewhere what the effect of this parameter is?

I kind of get the impression that DW can't be pushed very much away from its defaults before getting artifacts, which is a shame.

ChicoThorn commented 3 years ago

I wonder if some of the difference is just hardware? We talked about this a bit earlier, and it wouldn't surprise me. Going off of your suggestion about gamma 1.9 and contrast 1, I experimented around and now found a setting I like even better (at least on my rig). For me I'm getting really good results with DirectWrite set to gamma 1.9 and contrast at 1.3. — I also decided on using an RGB Tuning value of 4 in the ClearType section for the extra little thickness it provides to the strokes. I don't know, sometimes I think I'm going to see it different every single day and will end up tinkering with it forever... lol! Here's my latest effort:

ChicoThorn ini's - 2021.01.09-13Û20.zip

ChicoThorn ClearUI-v1.6 Screenshots - 2021.01.09-13Û20.zip

ChicoThorn ClearUI-v1 6 (D g1 9 c1 3 ct0)

ChicoThorn ClearUI-v1 6 (L g1 9 c1 3 ct0)

xSwagboy69x commented 3 years ago

@ChicoThorn

Hi Chico, thanks for your ini's and screens, very helpful. I couldn't help but notice that your titlebars are properly rendered by MacType -- this is something I'm trying to achieve as well, I had it set up as such in the past but I'm not sure what I did that changed it.

I opened another thread about the issue a while ago, unfortunately have yet to find a way to get those sweet rendered titlebars. I'm hoping you might have some ideas? :)

ChicoThorn commented 3 years ago

hoping you might have some ideas? :)

@Jessamynn Have you tried starting over with a clean ini file that you haven't customized yet? I'd recommend giving that a shot. Start over with one of my ChicoThorn ini's (such as the newest ChicoThorn Clear UI). Use the Registry mode (that's what I always use). Before you do any customizing to it though, run it just as it is and see if you get clearer Titlebars. Another thing to check would be any font substitutions you made in the Windows Registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes . Double check those to be sure they're set properly. 🙂

ChicoThorn ini's - 2021.01.09-13Û20.zip

xSwagboy69x commented 3 years ago

@ChicoThorn Thanks for your reply! Yes, I've certainly tried most of the typical troubleshooting methods, and just in case I tried both your "Soft" and "Clean" presets. They look great of course, but unfortunately no rendered titlebars :/

Afterwards, I checked the registry as per your suggestion — but I've honestly never looked at this key before so I have no idea if anything's wrong; it looks okay to my eyes. Here's a screenshot:

2021_01_14 - 02 55 56 AM

This shot is actually a good example, you can clearly see the titlebar font is a mess compared to the rest of the fonts being shown. I use Segoe UI system wide (Windows 10 default). I've also removed all mentions of excluded processes. I'm stumped!

Now, here's an old screenshot showing perfectly rendered titlebars that look good! So, I know that it worked in the past, I just have no idea what I may have changed :(

foobar2000_2019-11-08_23-26-12

ChicoThorn commented 3 years ago

Hi everybody! So I made the leap and am now using a 2K monitor (HP X27i 27" 2K QHD IPS Gaming Monitor)! The difference in clarity is astounding! When I first unboxed it and ran it for the first time I used the most recent ChicoThorn Clear UI ini I had uploaded (date stamp: 2021.01.09-13Û20). OMG! I honestly can't believe what a HUGE difference 2K makes in how spectacular MacType renders!

I changed my Windows scaling from 125% to 150% to accommodate the higher resolution. I also made some tweaks to the ini file. They're in the zip below. I'm curious how these new settings will look at 1080p (I no longer have the 1080p monitor for testing). If any of you have a 2K monitor I'd also love to hear your feedback on how these new settings work for you.

ChicoThorn Clear UI 2K ini's.zip

ChicoThorn ClearUI-v1.6-2K Screenshots.zip

ChicoThorn ClearUI-v1 6-2K (D g1 86 c1 9 ct0) ChicoThorn ClearUI-v1 6-2K (L g1 86 c1 9 ct0)
VladWinner commented 3 years ago

I'm curious how these new settings will look at 1080p (I no longer have the 1080p monitor for testing).

@ChicoThorn 100% Windows scaling, 1080p monitor. ChicoThorn ClearUI-v1.6-2K Comparison 1K.zip 1 — Disabled vs 2 — Version 1.6.0.0.0 – 2021.01.07-20Û40 vs 3 — 2K – Version 1.6 – 2021.01.22-07Û30 P.S. Notepad++ works in DirectWrite mode.

taprobane99 commented 3 years ago

For me the General settings are an improvement, but the DirectWrite are worse.

DW: 1.9 Gamma, 1.3 Contrast from your previous presets is the best so far. What programs do you mostly use for DW?

Testing on a 1080p 24 inch. (I do have a 2K monitor but that's only for Linux)