Tkfont new generation vs old #276
Comments
Is the old generated with "Microsoft Sans Serif" or "MS Sans Serif"? I'm not able to generate "MS Sans Serif" either using the old system or the new. DirectWrite is not supporting bitmap .fon files, so it can't support fonts like "MS Sans Serif", but we could use the old system in case DirectWrite can't handle it... but still, I can't make tkfont working with "MS Sans Serif" |
Yeah I cant make MS San Serif either, never could. I realized I used Microsoft Sans Serif for both, which now produces different results. Edit: In the old system, using Microsoft Sans Serif produced something that looked almost exactly like MS Sans Serif (no antialising/jeggedness) |
…able anti-aliasing when font size is <= 13 to mimic System.Drawing text anti-aliasing behavior
If you can test latest fix. I tried to emulate the behavior of default System.Drawing font, and actually force no-antialiasing when font-size <= 13. Anti-Aliasing is not completely equal at font size == 14, and is probably on par with higher font sizes. |
Changing the spacing to negative makes it look unnatural/not what it should. |
… original DirectXTk implementation. Add SpriteFontApp sample
Ok, hopefully this is the last fix. I have been struggling with the implem, and discovering that the code I used from DirectXTk was invalid in several parts... I should have not trusted it. |
Well, its working much better now! Few very minor issues though. Some glyphs seem to be spacing incorrectly (only slightly though). Ill create comparison image now. It also seems commas (,) are drawn as dots/fullstops (.), this could just be how directwrite processes such small fonts (I am using Microsoft Sans Serif size 10). |
…f round to have better spacing (will slightly increase overall size). Fix offsets for small fonts when rendering ","
I have tried to improve the issue of spacing (though it has increase slightly the overall width) and the incorrect rendering of "," |
Alright no problem, looks good now anyway as it. Thanks for all the patches. |
…the final value instead of the original advance value
Ok, probably last fix. I have modified the code to perform the round on the final value instead of the original advance value. This seems to improve the compact spacing and it looks closer to what we are seeing in Word for example. It is still not perfect with small fonts like MS sans serif 10, but the difference is difficult to distinguish. |
…the final value instead of the original advance value
Sorry, messed with wrong commit being uploaded. Last version should be fine |
I did some changes to the previous implem. Now the system doesn't automatically switch to no-AntiAlias when font is under <= 13. You need for this to specify I have double checked rendering with DirectWrite and offsets and spaces are on par. The only thing that is not supported is that DirectWrite is able to offset at subpixels but we can't do that in SharpDX as we are rendering bitmap fonts snapped to pixels. Also, you may be interested in using Pfew, quite a big rabbit hole this font rendering thing... Hope that I'm out of it ;) |
ClearType actually looks very nice! Rendering looks exactly like MS Sans Serif as well now. Once again, thank you. |
New:
Old:
Now each type of output could benefit difference situations depending on what you are developing. However, is it possible to get the old output with the new tkfont?
The xml file used for generation:
http://www.xanather.com/Main.xml
The text was updated successfully, but these errors were encountered: