コード例 #1
0
// FIXME: style param should come first
void FontBuilder::createFont(PassRefPtr<FontSelector> fontSelector, const RenderStyle* parentStyle, RenderStyle* style)
{
    if (!m_fontDirty)
        return;

    checkForGenericFamilyChange(style, parentStyle);
    checkForZoomChange(style, parentStyle);
    checkForOrientationChange(style);
    style->font().update(fontSelector);
    m_fontDirty = false;
}
コード例 #2
0
void FontBuilder::updateSpecifiedSize(FontDescription& fontDescription, const ComputedStyle& style)
{
    float specifiedSize = fontDescription.specifiedSize();

    if (!specifiedSize && fontDescription.keywordSize())
        specifiedSize = FontSize::fontSizeForKeyword(&m_document, fontDescription.keywordSize(), fontDescription.isMonospace());

    fontDescription.setSpecifiedSize(specifiedSize);

    checkForGenericFamilyChange(style.fontDescription(), fontDescription);
}