-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add GDI Font Matching Fallback #502
Conversation
Quick question: do you know if there’s a way to reimplement |
Should be possible, the overall process that Aegisub uses a |
Uhh, that sounds like preloading the whole font list? I see Aegisub use Actually, didn’t we break the DirectWrite provider with the recent changes for fonts of multiple styles? Now |
so this will make libass work in different way (better or more close to vsfilter) in windows? |
In theory it should. I probably need to rethink this when I have the time for it. |
@Ristellise What’s the current state of this PR? The code seems benign (and has been independently recreated [?] in #503 (comment)), but you said there was an Access Violation error somewhere. Can we help debug that? Is there a particular way to reproduce it? Also, are you saying these fonts do actually work in Aegisub’s libass? That is, is it safe to assume they work with |
Feel free to fork. Currently I'm trying to finish up my fansubbing stuff (Its taking a while), so I dont have motivation to work on it.
Specifically the line which
Currently building my own libass over at AegisubDC, It might be a bit annoying to setup as it uses Visual Studio to build the entire project. Another way to reproduce it is to try to load it through a font manager like fontbase and check it out from there, though this method seems a bit unreliable as it sometimes works while sometimes is doesnt. It's really dependent if the user experiences it or not.
According to reports I'm getting, yes. EDIT: I'm personally not comfortable pushing such a change to a library such as libass as I know I'll break something. So if anyone wants to fork from my work, please feel free to do so. As long as I get appropriate credit, its good enough for me :) |
You can refer to this, in the dwrite_c.h. You lack some dummy vtable entries. |
Ah, nice, thanks! That would explain it. |
Closing in favor of #503 with a more reasonable approach, refer to latest comments. |
This PR attempts to solve Font Manager related issues by introducing a font matching fallback through
CreateFontIndirect
.Note that this is a draft PR for the following reasons:
ass_msg
debug logging.Currently font managers such as fontbase write directly their values to registry in a way which directwrite is not able to find through their own methods, so when any user tries to load a font throught fontbase for example, the font appears
To bypass the issue, Aegisub has a GDI font selection patch that overrides libass directwrite font selection behavior.--
This PR's inspiration came mainly from this Chromium patch.