本文整理汇总了Java中org.fit.cssbox.css.CSSUnits.medium_font方法的典型用法代码示例。如果您正苦于以下问题:Java CSSUnits.medium_font方法的具体用法?Java CSSUnits.medium_font怎么用?Java CSSUnits.medium_font使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fit.cssbox.css.CSSUnits
的用法示例。
在下文中一共展示了CSSUnits.medium_font方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: VisualContext
import org.fit.cssbox.css.CSSUnits; //导入方法依赖的package包/类
public VisualContext(VisualContext parent, BoxFactory factory)
{
this.parent = parent;
this.factory = factory;
rootContext = (parent == null) ? this : parent.rootContext;
em = CSSUnits.medium_font;
rem = em;
ex = 0.6 * em;
ch = 0.8 * ch; //just an initial guess, updated in updateForGraphics()
dpi = org.fit.cssbox.css.CSSUnits.dpi;
font = new Font(Font.SERIF, Font.PLAIN, (int) CSSUnits.medium_font);
fontSize = CSSUnits.points(CSSUnits.medium_font);
fontWeight = CSSProperty.FontWeight.NORMAL;
fontStyle = CSSProperty.FontStyle.NORMAL;
fontVariant = CSSProperty.FontVariant.NORMAL;
textDecoration = new ArrayList<CSSProperty.TextDecoration>(2); //it is not very probable to have more than two decorations
color = Color.BLACK;
}
示例2: VisualContext
import org.fit.cssbox.css.CSSUnits; //导入方法依赖的package包/类
public VisualContext(VisualContext parent, BoxFactory factory)
{
this.parent = parent;
this.factory = factory;
font = new Font(Font.SERIF, Font.PLAIN, (int)((CSSUnits.medium_font * 72) / dpi)); //convert medium font to pixels
fontWeight = CSSProperty.FontWeight.NORMAL;
fontStyle = CSSProperty.FontStyle.NORMAL;
fontVariant = CSSProperty.FontVariant.NORMAL;
textDecoration = new ArrayList<CSSProperty.TextDecoration>(2); //it is not very probable to have more than two decorations
em = CSSUnits.medium_font;
ex = 0.6 * em;
dpi = org.fit.cssbox.css.CSSUnits.dpi;
color = Color.BLACK;
}