public override float getStrikethroughThickness() { #if WINFX return(GetTypeface().StrikethroughThickness *factor); #else return(mFont.getSize2D() / 18); #endif }
public NetLineMetrics(java.awt.Font aFont, String aString) { mFont = aFont; mString = aString; fontFamily = J2C.CreateFontFamily(aFont.getName()); style = (FontStyle)mFont.getStyle(); factor = aFont.getSize2D() / fontFamily.GetEmHeight(style); }
internal static java.awt.Font ConvertFont(Font font) { float size = font.Size; if (font.Unit != GraphicsUnit.Pixel) { size = font.SizeInPoints * java.awt.Toolkit.getDefaultToolkit().getScreenResolution() / 72; } java.awt.Font jFont = new java.awt.Font(font.Name, (int)font.Style, (int)size); if (jFont.getSize2D() != size) { jFont = jFont.deriveFont(size); } //TODO performance we should set the .NET Font, we can do it with an aditional constructor. return jFont; }
internal static java.awt.Font ConvertFont(Font font) { float size = font.Size; if (font.Unit != GraphicsUnit.Pixel) { size = font.SizeInPoints * java.awt.Toolkit.getDefaultToolkit().getScreenResolution() / 72; } java.awt.Font jFont = new java.awt.Font(font.Name, (int)font.Style, (int)size); if (jFont.getSize2D() != size) { jFont = jFont.deriveFont(size); } //TODO performance we should set the .NET Font, we can do it with an aditional constructor. return(jFont); }