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

Touhou series subtitles covered by black lanes. #440

Closed
sammilucia opened this issue Sep 30, 2018 · 9 comments
Closed

Touhou series subtitles covered by black lanes. #440

sammilucia opened this issue Sep 30, 2018 · 9 comments
Assignees

Comments

@sammilucia
Copy link
Collaborator

Originally posted by @Mahayu in #427 (comment)

@sammilucia
Copy link
Collaborator Author

Possibly an alpha blending issue in MacType? Or in Touhou

@snowie2000
Copy link
Owner

I'll check it later next week

@snowie2000
Copy link
Owner

The Touhou series has a lot of games, which game has the problem? Or all of them have it?

snowie2000 added a commit that referenced this issue Oct 9, 2018
This walkaround the issue #440.
I can't call it a solution, but most programs today runs under 24bit or 32bit graphic mode, so it should not matter much. And those 16bit programs, they should be able to stay in the degraded cleartype mode safe enough.
@Mahayu
Copy link

Mahayu commented Oct 10, 2018

The games after Touhou 10th will cause this bug.

Screenshot was taken from thwiki.cc,

default
default

Here is the oringal link:(Chinese)
https://thwiki.cc/%E5%AE%98%E6%96%B9%E6%B8%B8%E6%88%8F/%E9%94%99%E8%AF%AF%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95

Additional information:(Janpanese)
https://www26.atwiki.jp/touhoufuguaimatome/pages/188.html

@snowie2000
Copy link
Owner

snowie2000 commented Oct 10, 2018

qq 20181010164757
Here it is.
The black background problem is more or less solved. (by dropping support for 16bit graphic) But the texts are very hard to see using cleartype.

I believe the Touhou series used some sort of tricky method to get the text outline as VirtualBox did. (Virtualbox creates a special bitmap and draws texts on it, then it scans every pixel to look for the pixels with the highest bit modified, for GDI will modify every pixel it touched).
I searched for information about 16bit graphic and their RGB layout lies like:
XRRR RRGG GGGB BBBB meaning 2 bytes are used for one pixel (while 32bit uses 4bytes per pixel), and the first bit (marked as X) is not used).
I saw a lot of 00 80 like pixels in memory, so I guess it is the way the game extracts the text outline.

Since the 16bit graphic is rarely used today, I think we should put our limited effort on the things that most users use right now instead of writing (and optimize) another painting routine for rare cases. If you really need mactype to take effect on some old programs, maybe I can put an option somewhere to re-enable it.

@snowie2000
Copy link
Owner

Okay, Touhou 8th. Pretty readable texts. It's clear that the game did its own rendering to texts. It only uses GDI to get the shapes of texts (Why didn't they use more official ways like GetGlyphOutline?)
untitled

@Mahayu
Copy link

Mahayu commented Oct 12, 2018

Thanks for your effort. (And it wasn't Touhou 8th XD , it's just 12.3th.)
Anyway putting time on common issues is more important now, and I've put games in exclude lists.
Waiting for release. 👍

@sammilucia
Copy link
Collaborator Author

yay i think this is a good solution (disabling for 16 bit graphics)

@sammilucia
Copy link
Collaborator Author

Resolved by https://github.com/snowie2000/mactype/releases/tag/v1.2018.10.19-beta4. Please let us know if problems continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants