private static int enumFontsCallback(ref ENUMLOGFONTEX lpelfe, ref NEWTEXTMETRICEX lpntme, int FontType, int lParam) { if (lpelfe.elfLogFont.lfPitchAndFamily.HasFlag(FontPitchAndFamily.FIXED_PITCH)) { _monospaceFontNames.Add(lpelfe.elfFullName); } return(1); }
public int Callback(ref ENUMLOGFONTEX lpelfe, ref NEWTEXTMETRICEX lpntme, int fontType, int lParam) { try { cnt++; if (fontType != TRUETYPE_FONTTYPE) fontList.Add(lpelfe); } catch { } return cnt; }
public int EnumFontFamExProc(ref ENUMLOGFONTEX lpelfe, IntPtr lpntme, int FontType, IntPtr lParam) { try { _fonts.Add(lpelfe.elfLogFont); } catch (Exception e) { System.Diagnostics.Trace.WriteLine(e.ToString()); } return(0); }
public int Callback(ref ENUMLOGFONTEX lpelfe, ref NEWTEXTMETRICEX lpntme, int fontType, int lParam) { try { cnt++; if (fontType != TRUETYPE_FONTTYPE) { fontList.Add(lpelfe); } } catch {} return(cnt); }
public int callback1(ref ENUMLOGFONTEX lpelfe, ref NEWTEXTMETRICEX lpntme, int FontType, int lParam) { try { FontType fontType; if (FontType == 2 || FontType == 4) { fontType = (ClientTools.Fonts.FontType)FontType; } else { fontType = ClientTools.Fonts.FontType.Unknown; } FontFamilies.Add(new FontFamily(lpelfe.elfFullName, fontType)); } catch (Exception e) { System.Diagnostics.Trace.WriteLine(e.ToString()); } return(1); }
public int callback1(ref ENUMLOGFONTEX lpelfe, ref NEWTEXTMETRICEX lpntme, int FontTypeParam, int lParam) { try { FontType fontType; if (FontTypeParam == 2 || FontTypeParam == 4) { fontType = (FontType)FontTypeParam; } else { fontType = FontType.Unknown; } FontFamilies.Add(new FontFamily(lpelfe.elfFullName, fontType)); } catch (Exception e) { Console.WriteLine(e.ToString()); } return(1); }
public int callback1(ref ENUMLOGFONTEX lpelfe, ref NEWTEXTMETRICEX lpntme, int FontType, int lParam) { try { FontType fontType; if (FontType == 4 && lpelfe.elfFullName.StartsWith("@") == false && lpelfe.elfScript != "Symbol") { fontType = (FontType)FontType; FontFamilies.Add(new FontFamily(lpelfe.elfFullName, fontType) { Script = lpelfe.elfScript, Style = lpelfe.elfStyle, Weight = lpelfe.elfLogFont.lfWeight.ToString(), Charset = lpelfe.elfLogFont.lfCharSet.ToString() }); } else { fontType = Helpers.FontType.Unknown; } } catch (Exception e) { System.Diagnostics.Trace.WriteLine(e.ToString()); } return(1); }
private int CallbackFunc(ENUMLOGFONTEX f, int a, int b, int LParam) { Fonts[f.elfLogFont.lfFaceName] = "abc"; return(1); }
private static int enumFontsCallback(ref ENUMLOGFONTEX lpelfe, ref NEWTEXTMETRICEX lpntme, int FontType, int lParam) { if (lpelfe.elfLogFont.lfPitchAndFamily.HasFlag(FontPitchAndFamily.FIXED_PITCH)) _monospaceFontNames.Add(lpelfe.elfFullName); return 1; }
internal FontInfo(ENUMLOGFONTEX elf) { this.elf = elf; lf = elf.elfLogFont; }