aseprite / aseprite

Animated sprite editor & pixel art tool (Windows, macOS, Linux)

Home Page:https://www.aseprite.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The font rendering used an incorrect left offset

TakWolf opened this issue · comments

Demo fonts and theme is here: https://github.com/TakWolf/aseprite-universal-pixel-theme/releases

日本1234

In chrome:

image

In Aseprite:

image

Notice char and 1, these two characters happen to have an inner padding on the left side

image
image

Aseprime lost the offset of the x-axis of the glyph bitmap.

Make the example more obvious:

image
image

Thanks for this report. I think it's related to #1877
And implementing #4362 this issue should be solved.

I'll review this later.

@TakWolf I'm trying to take a look to this issue and see if using Skia (DirectWrite on Windows) to paint text with this font is fixed, but noticed that it make things worse (I have to investigate a little more):

image

🤒

Anyway I found out that with the current Aseprite implementation (v1.3.6), using Screen Scaling=100% and UI Scaling=200% things work a little better:

image

image

Anyway we'll try to find a proper solution.

It looks like the DirectWrite does't support .otf format too well, but .ttf fonts work great:

image

Could confirm this is an issue with DirectWrite?

Do other OTFs also have this issue?

For example:

https://unifoundry.com/unifont/index.html as 16px

https://github.com/adobe-fonts/source-han-serif/releases as Vectorial

It looks like an issue with DirectWrite only (or probably some setup that is missing in the Skia side/implementation of DirectWrite, probably something to review a little later), and probably with bitmap fonts only (?).

unifont with 16px:

image

SourceHanSerif-Medium.otf:

image

(there are some issues with the required width but it's something to fix yet).