public void *CreateFontIndirect(ref LOGFONTA Info) { var Remap = EntryPoint.SRL.ResolveRemap(Info.lfFaceName, Info.lfWidth, Info.lfHeight, Info.lfCharSet); if (Remap != null) { Info.lfHeight = Remap.Value.Height; Info.lfWidth = Remap.Value.Width; Info.lfFaceName = Remap.Value.To; Info.lfCharSet = (byte)Remap.Value.Charset; } return(Bypass(ref Info)); }
static IntPtr hCreateFontIndirectA(ref LOGFONTA FontInfo) { if (RedirFontSize(FontInfo.lfFaceName) != null) { string Change = RedirFontSize(FontInfo.lfFaceName); if (Change.StartsWith("+")) { FontInfo.lfWidth += int.Parse(Change); } else { int Val = int.Parse(Change); if (Val <= 0) { FontInfo.lfWidth += Val; } else { FontInfo.lfWidth = Val; } } } FontInfo.lfFaceName = RedirFaceName(FontInfo.lfFaceName); if (FontCharset != 0) { FontInfo.lfCharSet = FontCharset; } if (LogInput) { Log("CreateIndirectA Hooked, {0} 0x{1:X2}", true, FontInfo.lfFaceName, FontInfo.lfCharSet); } if (hCreatFontIndirectA.ImportHook) { return(CreateFontIndirectA(ref FontInfo)); } hCreatFontIndirectA.Uninstall(); var Result = CreateFontIndirectA(ref FontInfo); hCreatFontIndirectA.Install(); return(Result); }
static extern IntPtr CreateFontIndirectA([In] ref LOGFONTA FontInfo);