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

Apple fonttools fixes #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

HinTak
Copy link

@HinTak HinTak commented May 26, 2020

Various missing symbols required for Apple's font tool suite to run. Not sure about the sort order of things, but at least the changes go into the right files.

Please review.

@bugaevc
Copy link
Member

bugaevc commented May 26, 2020

LGTM, but please squash the commits.

@HinTak
Copy link
Author

HinTak commented May 26, 2020

I thought it is nicer to have them separate - besides it is easier to squash than to split a big one. I don't mind if you squash on merge (I think github gives you that choice).

Not too sure about the actual content of the strings /symbols - for most part I just reuse the names, but I drop the "k" sometimes and also an ending "key" or middle "key" . I suspect the actual content is important at a later stage? For the time being they just need to be present.

@bugaevc
Copy link
Member

bugaevc commented May 26, 2020

Oh, you didn't use the actual values? Please do — check what values the Apple version has.

@bugaevc
Copy link
Member

bugaevc commented May 26, 2020

On commits: there is a point in having good, self-contained commits that change one thing at a time. But there's no point in 7 "add some more symbols" commits in a row 🙂

@HinTak
Copy link
Author

HinTak commented May 26, 2020

How do you check? I have the cross version of otool / nm if that helps.

@bugaevc
Copy link
Member

bugaevc commented May 26, 2020

NSLog(@"%@", kCGFontNameKeyFullName);, for example 🙂

@HinTak
Copy link
Author

HinTak commented May 27, 2020

I meant how do you check if you have the genuine dylib (say, ask a friend to zip it up) but not the actual running OS...

@bugaevc
Copy link
Member

bugaevc commented May 27, 2020

The same way, just link to that dylib (instead of the system copy) under Darling.

@HinTak
Copy link
Author

HinTak commented May 27, 2020

The problem is that the genuine dylib has many other dependencies which does not load under darling, so does not run :-) .

@bugaevc
Copy link
Member

bugaevc commented May 27, 2020

Oh, well. Then you're going to have to see what the symbol points to, and extract the CFString from there. Simply running strings on the binary may give you enough data, or you can load it in Mach-O View.

@HinTak
Copy link
Author

HinTak commented May 27, 2020

Well, if genuine lib loads, I'd have just copied it over the darling ones :-). I'll see what I can do with those. It seems matching precisely is important....

@HinTak
Copy link
Author

HinTak commented May 29, 2020

I managed to hack at python ctypes to do lazy loading, and use darling python to look at some of the genuine libs.

Btw, mach-o view seems to spin a lot and does nothing - is it supposed to work under darling? I tried "-NSOpen" like the other advice but it still spins. Perhaps somebody can update the doc if it is supposed to work...

@CKegel
Copy link

CKegel commented Jun 23, 2023

Has there been any progress on this? If not, I would be happy to help find the actual values.

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

Successfully merging this pull request may close these issues.

3 participants