void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const { // Don't draw anything while we are using custom fonts that are in the process of loading. if (loadingCustomFonts()) return; to = (to == -1 ? run.length() : to); #if ENABLE(SVG_FONTS) if (primaryFont()->isSVGFont()) { drawTextUsingSVGFont(context, run, point, from, to); return; } #endif CodePath codePathToUse = codePath(run); #if PLATFORM(QT) && HAVE(QRAWFONT) if (context->textDrawingMode() & TextModeStroke || context->contextShadow()->m_type != ContextShadow::NoShadow) codePathToUse = Complex; #endif if (codePathToUse != Complex) return drawSimpleText(context, run, point, from, to); return drawComplexText(context, run, point, from, to); }
void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const { if (loadingCustomFonts()) return; if (to < 0) to = run.length(); if (codePath(run) != Complex) drawEmphasisMarksForSimpleText(context, run, mark, point, from, to); else drawEmphasisMarksForComplexText(context, run, mark, point, from, to); }
void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const { // Don't draw anything while we are using custom fonts that are in the process of loading. if (loadingCustomFonts()) return; to = (to == -1 ? run.length() : to); CodePath codePathToUse = codePath(run); if (codePathToUse != Complex) return drawSimpleText(context, run, point, from, to); return drawComplexText(context, run, point, from, to); }
bool Font::operator==(const Font& other) const { // Our FontData don't have to be checked, since checking the font description will be fine. // FIXME: This does not work if the font was made with the FontPlatformData constructor. if (loadingCustomFonts() || other.loadingCustomFonts()) return false; FontSelector* first = m_fontFallbackList ? m_fontFallbackList->fontSelector() : 0; FontSelector* second = other.m_fontFallbackList ? other.m_fontFallbackList->fontSelector() : 0; return first == second && m_fontDescription == other.m_fontDescription && (m_fontFallbackList ? m_fontFallbackList->fontSelectorVersion() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->fontSelectorVersion() : 0) && (m_fontFallbackList ? m_fontFallbackList->generation() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->generation() : 0); }
void Font::drawEmphasisMarks(GraphicsContext* context, const TextRunPaintInfo& runInfo, const AtomicString& mark, const FloatPoint& point) const { if (loadingCustomFonts()) return; CodePath codePathToUse = codePath(runInfo.run); // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 if (codePathToUse != ComplexPath && fontDescription().typesettingFeatures() && (runInfo.from || runInfo.to != runInfo.run.length())) codePathToUse = ComplexPath; if (codePathToUse != ComplexPath) drawEmphasisMarksForSimpleText(context, runInfo, mark, point); else drawEmphasisMarksForComplexText(context, runInfo, mark, point); }
void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const { if (loadingCustomFonts()) return; if (to < 0) to = run.length(); CodePath codePathToUse = codePath(run); // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 if (codePathToUse != Complex && typesettingFeatures() && (from || to != run.length())) codePathToUse = Complex; if (codePathToUse != Complex) drawEmphasisMarksForSimpleText(context, run, mark, point, from, to); else drawEmphasisMarksForComplexText(context, run, mark, point, from, to); }
void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const { // Don't draw anything while we are using custom fonts that are in the process of loading. if (loadingCustomFonts()) return; to = (to == -1 ? run.length() : to); CodePath codePathToUse = codePath(run); // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 if (codePathToUse != Complex && typesettingFeatures() && (from || to != run.length())) codePathToUse = Complex; if (codePathToUse != Complex) return drawSimpleText(context, run, point, from, to); return drawComplexText(context, run, point, from, to); }
void Font::drawText(GraphicsContext* context, const TextRunPaintInfo& runInfo, const FloatPoint& point, CustomFontNotReadyAction customFontNotReadyAction) const { // Don't draw anything while we are using custom fonts that are in the process of loading, // except if the 'force' argument is set to true (in which case it will use a fallback // font). if (loadingCustomFonts() && customFontNotReadyAction == DoNotPaintIfFontNotReady) return; CodePath codePathToUse = codePath(runInfo.run); // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 if (codePathToUse != ComplexPath && fontDescription().typesettingFeatures() && (runInfo.from || runInfo.to != runInfo.run.length())) codePathToUse = ComplexPath; if (codePathToUse != ComplexPath) return drawSimpleText(context, runInfo, point); return drawComplexText(context, runInfo, point); }
void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const { if (loadingCustomFonts()) return; if (to < 0) to = run.length(); #if ENABLE(SVG_FONTS) // FIXME: Implement for SVG fonts. if (primaryFont()->isSVGFont()) return; #endif if (codePath(run) != Complex) drawEmphasisMarksForSimpleText(context, run, mark, point, from, to); else drawEmphasisMarksForComplexText(context, run, mark, point, from, to); }
void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const { // Don't draw anything while we are using custom fonts that are in the process of loading. if (loadingCustomFonts()) return; to = (to == -1 ? run.length() : to); CodePath codePathToUse = codePath(run); #if PLATFORM(QT) && HAVE(QRAWFONT) if (context->textDrawingMode() & TextModeStroke) codePathToUse = Complex; #endif if (codePathToUse != Complex) return drawSimpleText(context, run, point, from, to); return drawComplexText(context, run, point, from, to); }
void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const { // Don't draw anything while we are using custom fonts that are in the process of loading. if (loadingCustomFonts()) return; to = (to == -1 ? run.length() : to); #if ENABLE(SVG_FONTS) if (primaryFont()->isSVGFont()) { drawTextUsingSVGFont(context, run, point, from, to); return; } #endif if (codePath(run) != Complex) return drawSimpleText(context, run, point, from, to); return drawComplexText(context, run, point, from, to); }