and need freetype lib with symbols for ur compiler, bro 👆
You need
@snowie2000 I built the latest version without windows SDK for 10, am I missing something?
Also, is there any requirement about the version of libraries (I can build mactype with FreeType 2.6.5 multi-threaded but if I use single-threaded version, it failed) or .NET Framework (VS2015 modified files to compatible with .NET Framework 4.5.2, easyhook has .NET 3 and .NET 4 versions)
The last thing is, the build of latest version totally didn't work on my Windows 10, and according to some reports, it may cause explorer crash. I totally don't know what to do next.
@snowie2000 There is no available windows SDK for 10.1, the latest version is 10.0.14393.33
@sanddudu recompile freetype with MT\MD, static etc. See tutor or basis c++ in windows
@brainblowjob I already built freetype multi-threaded version so I can build the whole project.
@sanddudu
Latest SDK is fine. it's required because of the directwrite support I introduced in the last version.
You should use Multithreaded version of freetype or it may fail to build.
for Windows 10 compatibility, Update you easyhook to the latest version. If you encounter the mt64agnt.exe crash issue, you have no other ways but wait for my modified version of easyhook included in the coming version, 'cause the original easyhook lacks support of certain asm instructions.
@sanddudu
If you are using windows7, congratulations!
If you are on Windows8/8.1/10, update your easyhook source and good luck.
@snowie2000 Well, I am using latest easyhook source. But my build still doesn't work for me. It works fine (no crash) but the hot shift doesn't work anymore. And Chrome 52 still can't render by mactype (No GDI support now).
Actually, the report is the explorer will go into a boot loop, but the system won't crash (If using an old version of easyhook, the whole system will crash).
Will you release an official build recently?
@sanddudu
Yes, an official build will become available soon.
I see a boot loop after I updated my windows 10 to the anniversary edition, but after I replaced easyhook with the latest version from easyhook official site, no boot loop or crash occurs any more. (however, mactype for x64 is completely unusable for some computers). I didn't see any problems with hot shift function.
@snowie2000 I mean the latest version I built. Not old official mactype (It works fine).
@sanddudu
Remember to use the release version! MSVC generates different codes in DEBUG mode that will make some hooks invalid.
@snowie2000 I did use release version of every libraries and mactype.
I really have no idea what's happened, maybe you should have a look at the function CreateFontIndirectExW, it is the core hook of the font substitution.
@snowie2000 Thanks for your advice.
why not have a release?
the build is so hard.
hard to download build tools and more
@Ive4
Yes, an official build will become available soon.
@sanddudu
I've tested your build published on tieba.baidu.com, and it works totally fine, even the font substitution works flawlessly.
If you were talking about font substitution in directwrite, no, it's not implemented yet, the code related to this function has been temporarily removed. It may back later. or not.
@sanddudu
One more thing. You linked you build with easyhook32/64.dll while you published your files with easyhk32/64.dll.
@snowie2000 Thanks for your notice.
Here is a problem when I building mactype.
if (dw) {
CComPtr<IDWriteFactory> pDWriteFactory;
PFN_DWriteCreateFactory(DWFactory)(DWRITE_FACTORY_TYPE_ISOLATED,
__uuidof(IDWriteFactory),
reinterpret_cast<IUnknown**>(&pDWriteFactory));
MakeD2DParams(pDWriteFactory);
if (FAILED(pDWriteFactory->GetGdiInterop(&g_pGdiInterop))) FAILEXIT; //判断不正确
HOOK(pDWriteFactory, CreateTextFormat, 15);
CComPtr<IDWriteFont> dfont = NULL;
CComPtr<IDWriteFontCollection> fontcollection = NULL;
CComPtr<IDWriteFontFamily> ffamily = NULL;
if (FAILED(pDWriteFactory->GetSystemFontCollection(&fontcollection, false))) FAILEXIT;
if (FAILED(fontcollection->GetFontFamily(0, &ffamily))) FAILEXIT;
if (FAILED(ffamily->GetFont(0, &dfont))) FAILEXIT;
HOOK(dfont, CreateFontFace, 13);
}
I can't build because it will return an error.
directwrite.cpp(951): error C2440: “初始化”: 无法从“initializer list”转换为“PFN_DWriteCreateFactory”
"DWRITE_FACTORY_TYPE" 类型的值不能用于初始化 "PFN_DWriteCreateFactory" 类型的实体
I can only pass with
(PFN_DWriteCreateFactory(DWFactory))(DWRITE_FACTORY_TYPE_ISOLATED,
__uuidof(IDWriteFactory),
reinterpret_cast<IUnknown**>(&pDWriteFactory));
MakeD2DParams(pDWriteFactory);
I don't know very much about C++, so only thing I can do is report it to you.
Also, the latest build still can't render Chrome 52. Other features ( like hot shift ) work fine.
I am wondering is the original EasyHook support the latest directwrite support? I have seen a patch that modified easyhook too.
You mean the Mactype-patch? That one I forked in my repo?
He modified the easyhook just because he starts the project before my publication of mactype source, then he has to use some hacks to inject to mactype. While easyhook in this case, is the ideal choice for its open source nature.
The official easyhook does a nice job on most systems, but in some rare cases, Microsoft wrote some code in some API (mainly GetTextFaceAliasW) which cannot be supported by easyhook (conditional jump in the head) that finally causes boot loop in mt64agnt.
@snowie2000 Thanks for your answer. With most people reported the latest version still cannot work with directwrite, someone just said it works on his PC. I am starting to investigate the reason.
@sanddudu Try again with latest source.
@snowie2000 Sad story, it doesn't work either.
I have noticed there is a new debug function you just added, do I need to build a debug version and test it?
@sanddudu
Oh, did you remeber to add the directwrite switch to your profile? Here is how:
[general]
...(anything)
DirectWrite=1 (case insensitive)
...(other configs)
it won't work if you didn't enable it.
@snowie2000 It's start rendering Chrome 52 but not as good as old time.
Still, thank you very much.
@sanddudu
Even more sad that chrome is using a very weird way to render text with DirectWrite, which is really hard to intercept, while ie on the other hand has more hope to get supported.
@sanddudu
I think you can try using a separate gamma for chrome.
[[email protected]]
GammaValue=1.8
@river1 Thanks for your advice. But it seems doesn't work for me.
@sanddudu The way chrome uses to render ignores all params other than RenderingMode.
@brainblowjob {short rant about why and how you're a piece of shit}
thanks for being a huge dick about it instead of helping explain, that was really cool. I've spent the last few hours ( a G E N E R O U S estimate) just trying to find out why i couldn't build mactype, because i'd never compiled anything on windows before. Turns out there were several problems with my paths and VS files because I let some other guy who was a programmer use my computer and he liked to use only a text interface and his own compiler or something to that effect, which forced VS to leave several components uninstalled or interfering with one another, but going forward thinking I was an idiot for not being able to figure it out due to your negative criticism, I continued searching for a solution despite finding several other threads full of unanswered questions full of people just like you, completely unwilling to help, and instead presuming to insult other people's intelligence. My research basically lead to dead ends forever until I uninstalled and reinstalled VS, at which point my friend happened to message me back in IRC to let me know he didn't think i would be using those tools, and had a list of things for me to uninstall and change. I spent at least 4 hours looking in the wrong place because you couldn't tell me that one... simple... command... should be able to compile this entire fucking program, and that if that doesn't work something is wrong with my files or settings. So thanks for choosing to be a dick in place of being a decent human being. I'm sure the universe will reward you appropriately.
@KyuriousRex Dude, you need chill out.
I was trying to build this project too. Though I was the only one use my computer and have already a clean install of Visual Studio, I still cost about 3 hours to figure out all the dependencies of mactype (freetype, easyhook). And I have to solve a code problem with my friend‘s help.
I know why you are angry, everyone will angry if someone wastes his/her times. But sometimes you have to take it. Because you have to admit it: you will get information easier on the Internet, but the accuracy is always unknown. Due to the convenience of post messages, somebody doesn't check if their words are correct or not. Someone do it on purpose, but someone not. So the only things you can do is using some authorized source, such as Stackoverflow and Quora. Or just turn to the author of codes for help. But just remember, sometimes costs time is necessary (like figure out how to do something).
Hope you calmed down after reading my post.
Hi,
How do I compile FreeType 2.6.5? Using MinGW or Visual Studio?
I would be much appreciated if anyone can give me more detailed steps. I have tried using mingw32-make.exe and mysys but always failed.
I'm using Windows 10 Enterprise 64 bit.
Thanks!
@fung I use msvc2013 to compile mactype and all its dependencies. You are free to use any compiles to make your build as far as you can handle them :)
I added a how to build doc, hope it will help a bit.
@snowie2000 Any Release date?
@snowie2000 Thanks!!! It helps a lot!
I have tried to install with MacTypeInstaller_2013_1231_0.exe. Then replaced all compiled DLLs (in MacType installation, System32 and SysWOW64 folders).
It seems to be working. However, I notice mt64agnt.exe keep crashing when I started MacTray.exe.
This is due to the incapability of easyhook that it doesn't support hooking conditional jump. it's quite strange that it only occurs on some system, it seems like these systems have a different version of some core dlls.
A simple workaround is commenting the hook of GetTextFaceAliasW, which contains the conditional jump asm in most cases. You can give it a try.
PS: in this case, do not use font substitution function
Most helpful comment
I added a how to build doc, hope it will help a bit.