Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8987f06f authored by Raph Levien's avatar Raph Levien
Browse files

resolved conflicts for merge of 7e433f10 to master

Change-Id: Ifa3a144c791c0143c62f4aa23a5db57a93c32a17
parents 31761ed2 7e433f10
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -822,27 +822,26 @@ size_t TextLayoutShaper::shapeFontRun(const SkPaint* paint) {
        baseGlyphCount = paint->getBaseGlyphCount(firstUnichar);
    }

    SkTypeface* scriptTypeface = NULL;
    if (baseGlyphCount != 0) {
        SkTypeface::Style style = SkTypeface::kNormal;
        if (typeface != NULL) {
            style = typeface->style();
        }
        typeface = typefaceForScript(paint, typeface, hb_buffer_get_script(mBuffer));
        if (!typeface) {
            baseGlyphCount = 0;
            typeface = SkTypeface::CreateFromName(NULL, style);
        scriptTypeface = typefaceForScript(paint, typeface,
            hb_buffer_get_script(mBuffer));
#if DEBUG_GLYPHS
            ALOGD("Using Default Typeface");
        ALOGD("Using Default Typeface for script %c%c%c%c",
            HB_UNTAG(hb_buffer_get_script(mBuffer)));
#endif
    }
    if (scriptTypeface) {
        typeface = scriptTypeface;
    } else {
        baseGlyphCount = 0;
        if (typeface) {
            SkSafeRef(typeface);
        } else {
        if (!typeface) {
            typeface = SkTypeface::CreateFromName(NULL, SkTypeface::kNormal);
#if DEBUG_GLYPHS
            ALOGD("Using Default Typeface (normal style)");
#endif
        } else {
            SkSafeRef(typeface);
        }
    }