diff --git a/m133/include/core/SkTypeface.h b/m133/include/core/SkTypeface.h index 62f0c610ea3fde3f23fe192c812a5f2840e513b5..4f38452105a004d38a44dc31925fb37b49a1fbfe 100644 --- a/m133/include/core/SkTypeface.h +++ b/m133/include/core/SkTypeface.h @@ -113,7 +113,7 @@ public: /** Creates a new reference to the typeface that most closely matches the requested familyName and fontStyle. This method allows extended font - face specifiers as in the SkFontStyle type. + face specifiers as in the SkFontStyle type. Will never return null. @param familyName May be NULL. The name of the font family. @param fontStyle The style of the typeface. diff --git a/m133/modules/skparagraph/include/Paragraph.h b/m133/modules/skparagraph/include/Paragraph.h index 0bcc0d5b62357108ab2af86f5c5eb1ebf914dac6..9cf2cd9c09e22552af217fac4e78d4db2eb8a365 100644 --- a/m133/modules/skparagraph/include/Paragraph.h +++ b/m133/modules/skparagraph/include/Paragraph.h @@ -34,7 +34,7 @@ enum InternalState { kDrawn = 7 }; -enum class UtfEncodeType { +enum UtfEncodeType { kUtf8, kUtf16 }; diff --git a/m133/modules/skparagraph/src/OneLineShaper.cpp b/m133/modules/skparagraph/src/OneLineShaper.cpp index fa6eda6219d121eec5613b83d132091919c6e312..ce0b62fbd31da2185df8c441e5dc70397e481b64 100644 --- a/m133/modules/skparagraph/src/OneLineShaper.cpp +++ b/m133/modules/skparagraph/src/OneLineShaper.cpp @@ -7,6 +7,8 @@ #ifdef ENABLE_TEXT_ENHANCE #include "src/Run.h" #include "include/TextGlobalConfig.h" +#include "include/TextStyle.h" +#include "SkScalar.h" #include "trace.h" #endif diff --git a/m133/modules/skparagraph/src/ParagraphCache.cpp b/m133/modules/skparagraph/src/ParagraphCache.cpp index 7e35661dae8667594dc1d390815271eb83a0a080..2944b6cfd9c88abba0958aac6a1d1e7b6785b3eb 100644 --- a/m133/modules/skparagraph/src/ParagraphCache.cpp +++ b/m133/modules/skparagraph/src/ParagraphCache.cpp @@ -473,7 +473,7 @@ void ParagraphCache::SetStoredLayoutImpl(ParagraphImpl& paragraph, ParagraphCach paragraph.getIntrinsicSize(value->fMaxIntrinsicWidth, value->fMinIntrinsicWidth, value->fAlphabeticBaseline, value->fIdeographicBaseline, value->fExceededMaxLines); - for (auto& indent : paragraph.fIndents) { + for (auto& indent : value->indents) { value->indents.push_back(indent); } value->linebreakStrategy = paragraph.getLineBreakStrategy(); diff --git a/m133/modules/skparagraph/src/Run.cpp b/m133/modules/skparagraph/src/Run.cpp index 7596fb61c4659dbc150fb74de0cf52c0439e0576..0569131e4a113ed240f952052b465152858af05c 100644 --- a/m133/modules/skparagraph/src/Run.cpp +++ b/m133/modules/skparagraph/src/Run.cpp @@ -692,8 +692,7 @@ void Run::updateMetrics(InternalLineMetrics* endlineMetrics) { fFontMetrics.fLeading = 0; - updatePlaceholderAlignmentIfNeeded(placeholderStyle->fAlignment, - fOwner->getParagraphStyle().getVerticalAlignment()); + updatePlaceholderAlignmentIfNeeded(placeholderStyle->fAlignment, fOwner->getParagraphStyle().getVerticalAlignment()); switch (placeholderStyle->fAlignment) { case PlaceholderAlignment::kBaseline: diff --git a/m133/modules/skparagraph/src/TextLine.cpp b/m133/modules/skparagraph/src/TextLine.cpp index 6a849f3c0477c77f40de1ab6093abb3283ee109e..d02c063e710908d2521d4afa6d113c045fd78c0c 100644 --- a/m133/modules/skparagraph/src/TextLine.cpp +++ b/m133/modules/skparagraph/src/TextLine.cpp @@ -1364,8 +1364,7 @@ void TextLine::middleEllipsisUpdateLine(ClusterIndex& startIndex, ClusterIndex& { const Cluster& startCluster = fOwner->cluster(startIndex); const Cluster& endCluster = fOwner->cluster(endIndex); - fEllipsis->fTextRange = TextRange(startCluster.textRange().start, - startCluster.textRange().start + fEllipsis->size()); + fEllipsis->fTextRange = TextRange(startCluster.textRange().start, startCluster.textRange().start + fEllipsis->size()); fEllipsis->setOwner(fOwner); fEllipsis->fClusterStart = startCluster.textRange().start; fEllipsisIndex = startCluster.runIndex(); diff --git a/m133/src/ports/skia_ohos/FontConfig_ohos.h b/m133/src/ports/skia_ohos/FontConfig_ohos.h index 46c6d2990d08f9fbcc4aade2b3e454b32fc0168d..4823844200b27d2eb3e152a83183478ca84ef8d4 100644 --- a/m133/src/ports/skia_ohos/FontConfig_ohos.h +++ b/m133/src/ports/skia_ohos/FontConfig_ohos.h @@ -9,7 +9,6 @@ #include #include #include -#include #include "FontInfo_ohos.h" #include "HmSymbolConfig_ohos.h" diff --git a/m133/src/ports/skia_ohos/SkFontMgr_ohos.h b/m133/src/ports/skia_ohos/SkFontMgr_ohos.h index 153786fe694c47e680ae28ff5bbbae86c7b6377d..6c58ed2e87014ec75f9132e1f864008e13c340b3 100644 --- a/m133/src/ports/skia_ohos/SkFontMgr_ohos.h +++ b/m133/src/ports/skia_ohos/SkFontMgr_ohos.h @@ -1,6 +1,11 @@ -// Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * 2023.4.23 SkFontMgr on ohos. + * Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved. + */ #ifndef SKFONTMGR_OHOS_H #define SKFONTMGR_OHOS_H