Skip to content
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

The font rendering used an incorrect left offset #4397

Open
TakWolf opened this issue Apr 3, 2024 · 7 comments
Open

The font rendering used an incorrect left offset #4397

TakWolf opened this issue Apr 3, 2024 · 7 comments
Assignees
Milestone

Comments

@TakWolf
Copy link
Contributor

TakWolf commented Apr 3, 2024

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.

@TakWolf
Copy link
Contributor Author

TakWolf commented Apr 3, 2024

Make the example more obvious:

image
image

@Gasparoken
Copy link
Member

Gasparoken commented Apr 9, 2024

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

@dacap
Copy link
Member

dacap commented Apr 9, 2024

I'll review this later.

@dacap dacap self-assigned this Apr 9, 2024
@dacap dacap added this to the v1.3.8-beta milestone Apr 19, 2024
@dacap dacap added bug ui and removed triage labels Apr 19, 2024
@dacap
Copy link
Member

dacap commented Apr 19, 2024

@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.

@dacap
Copy link
Member

dacap commented Apr 19, 2024

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

image

@TakWolf
Copy link
Contributor Author

TakWolf commented Apr 22, 2024

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

@dacap
Copy link
Member

dacap commented Apr 22, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

3 participants