/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing/ |
H A D | js_drawing_utils.cpp | 215 napi_value GetFontMetricsAndConvertToJsValue(napi_env env, FontMetrics* metrics) in GetFontMetricsAndConvertToJsValue() argument 219 if (metrics != nullptr && objValue != nullptr) { in GetFontMetricsAndConvertToJsValue() 220 napi_set_named_property(env, objValue, "top", CreateJsNumber(env, metrics->fTop)); in GetFontMetricsAndConvertToJsValue() 221 napi_set_named_property(env, objValue, "ascent", CreateJsNumber(env, metrics->fAscent)); in GetFontMetricsAndConvertToJsValue() 222 napi_set_named_property(env, objValue, "descent", CreateJsNumber(env, metrics->fDescent)); in GetFontMetricsAndConvertToJsValue() 223 napi_set_named_property(env, objValue, "bottom", CreateJsNumber(env, metrics->fBottom)); in GetFontMetricsAndConvertToJsValue() 224 napi_set_named_property(env, objValue, "leading", CreateJsNumber(env, metrics->fLeading)); in GetFontMetricsAndConvertToJsValue() 225 napi_set_named_property(env, objValue, "flags", CreateJsNumber(env, metrics->fFlags)); in GetFontMetricsAndConvertToJsValue() 226 napi_set_named_property(env, objValue, "avgCharWidth", CreateJsNumber(env, metrics->fAvgCharWidth)); in GetFontMetricsAndConvertToJsValue() 227 napi_set_named_property(env, objValue, "maxCharWidth", CreateJsNumber(env, metrics in GetFontMetricsAndConvertToJsValue() [all...] |
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/src/ |
H A D | drawing_font.cpp | 380 FontMetrics metrics; in OH_Drawing_FontGetMetrics() local 381 ret = font->GetMetrics(&metrics); in OH_Drawing_FontGetMetrics() 383 cFontMetrics->flags = metrics.fFlags; in OH_Drawing_FontGetMetrics() 384 cFontMetrics->top = metrics.fTop; in OH_Drawing_FontGetMetrics() 385 cFontMetrics->ascent = metrics.fAscent; in OH_Drawing_FontGetMetrics() 386 cFontMetrics->descent = metrics.fDescent; in OH_Drawing_FontGetMetrics() 387 cFontMetrics->leading = metrics.fLeading; in OH_Drawing_FontGetMetrics() 388 cFontMetrics->bottom = metrics.fBottom; in OH_Drawing_FontGetMetrics() 389 cFontMetrics->avgCharWidth = metrics.fAvgCharWidth; in OH_Drawing_FontGetMetrics() 390 cFontMetrics->maxCharWidth = metrics in OH_Drawing_FontGetMetrics() [all...] |
/foundation/graphic/graphic_2d/rosen/modules/texgine/texgine_drawing/src/ |
H A D | texgine_font.cpp | 43 float TexgineFont::GetMetrics(std::shared_ptr<TexgineFontMetrics> metrics) const in GetMetrics() 45 if (metrics == nullptr) { in GetMetrics() 49 return font_->GetMetrics(metrics->GetFontMetrics().get()); in GetMetrics()
|
H A D | texgine_font_metrics.cpp | 45 void TexgineFontMetrics::SetFontMetrics(const std::shared_ptr<RSFontMetrics> metrics) in SetFontMetrics() argument 47 if (metrics == nullptr) { in SetFontMetrics() 51 fontMetrics_ = metrics; in SetFontMetrics()
|
H A D | texgine_font_metrics.h | 31 void SetFontMetrics(const std::shared_ptr<RSFontMetrics> metrics);
|
H A D | texgine_font.h | 57 * @brief Get metrics of the font 59 float GetMetrics(std::shared_ptr<TexgineFontMetrics> metrics) const; 62 * @brief Get metrics of the font
|
/foundation/arkui/ace_engine/interfaces/native/node/ |
H A D | native_node_extented.cpp | 127 ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMetrics* metrics) in OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics() 129 if (!event || !metrics || !event->event) { in OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics() 132 event->event->numberReturnData[0].f32 = metrics->width; in OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics() 133 event->event->numberReturnData[1].f32 = metrics->height; in OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics() 175 ArkUI_CustomSpanMetrics* metrics = new ArkUI_CustomSpanMetrics { 0, 0 }; in OH_ArkUI_CustomSpanMetrics_Create() local 176 return metrics; in OH_ArkUI_CustomSpanMetrics_Create() 179 void OH_ArkUI_CustomSpanMetrics_Dispose(ArkUI_CustomSpanMetrics* metrics) in OH_ArkUI_CustomSpanMetrics_Dispose() argument 181 if (!metrics) { in OH_ArkUI_CustomSpanMetrics_Dispose() 184 delete metrics; in OH_ArkUI_CustomSpanMetrics_Dispose() 185 metrics in OH_ArkUI_CustomSpanMetrics_Dispose() 126 OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics( ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMetrics* metrics) OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics() argument 188 OH_ArkUI_CustomSpanMetrics_SetWidth(ArkUI_CustomSpanMetrics* metrics, float width) OH_ArkUI_CustomSpanMetrics_SetWidth() argument 197 OH_ArkUI_CustomSpanMetrics_SetHeight(ArkUI_CustomSpanMetrics* metrics, float height) OH_ArkUI_CustomSpanMetrics_SetHeight() argument [all...] |
/foundation/graphic/graphic_2d/rosen/test/2d_engine/unittest/rosen_text/skia_txt/ |
H A D | paragraph_test.cpp | 180 auto metrics = paragraph_->MeasureText(); in HWTEST_F() local 182 EXPECT_EQ(lineMetrics.fAscent, -metrics.fAscent); in HWTEST_F() 183 EXPECT_EQ(lineMetrics.fDescent, metrics.fDescent); in HWTEST_F() 235 auto metrics = paragraph_->MeasureText(); in HWTEST_F() local 236 EXPECT_EQ(metrics.fAscent, fontMetrics.at(0).fAscent); in HWTEST_F() 237 EXPECT_EQ(metrics.fDescent, fontMetrics.at(0).fDescent); in HWTEST_F() 304 auto metrics = paragraph_->GetLineMetrics(); in HWTEST_F() local 305 for (auto skLineMetrics : metrics) { in HWTEST_F()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/skia_txt/txt/ |
H A D | line_metrics.h | 32 RunMetrics(const TextStyle* style, const Drawing::FontMetrics& metrics) in RunMetrics() argument 33 : textStyle(style), fontMetrics(metrics) {} in RunMetrics()
|
/foundation/arkui/ace_engine/frameworks/core/components/text_overlay/ |
H A D | text_overlay_manager.cpp | 318 CaretMetrics metrics; local 325 computeSuccess = ComputeOffsetForCaretCloserToClick(cursorPositionForShow_, metrics); 329 ComputeOffsetForCaretDownstream(extent, metrics) || ComputeOffsetForCaretUpstream(extent, metrics); 332 ComputeOffsetForCaretUpstream(extent, metrics) || ComputeOffsetForCaretDownstream(extent, metrics); 336 if (metrics.height <= 0 || std::isnan(metrics.height)) { 340 caretRect.SetRect(metrics.offset.GetX(), metrics [all...] |
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/text/utils/ |
H A D | napi_common.cpp | 706 napi_value GetFontMetricsAndConvertToJsValue(napi_env env, Drawing::FontMetrics* metrics)
710 if (metrics != nullptr && objValue != nullptr) {
711 napi_set_named_property(env, objValue, "top", CreateJsNumber(env, metrics->fTop));
712 napi_set_named_property(env, objValue, "ascent", CreateJsNumber(env, metrics->fAscent));
713 napi_set_named_property(env, objValue, "descent", CreateJsNumber(env, metrics->fDescent));
714 napi_set_named_property(env, objValue, "bottom", CreateJsNumber(env, metrics->fBottom));
715 napi_set_named_property(env, objValue, "leading", CreateJsNumber(env, metrics->fLeading));
716 napi_set_named_property(env, objValue, "flags", CreateJsNumber(env, metrics->fFlags));
717 napi_set_named_property(env, objValue, "avgCharWidth", CreateJsNumber(env, metrics->fAvgCharWidth));
718 napi_set_named_property(env, objValue, "maxCharWidth", CreateJsNumber(env, metrics [all...] |
/foundation/multimedia/drm_framework/frameworks/c/drm_capi/ |
H A D | native_mediakeysystem.cpp | 286 static Drm_ErrCode vectorToClist(std::vector<IMediaKeySystemService::MetircKeyValue> &metrics, in vectorToClist() argument 291 statistics->statisticsCount = metrics.size(); in vectorToClist() 294 for (size_t i = 0; i < metrics.size(); i++) { in vectorToClist() 295 if (metrics[i].name.size() == 0) { in vectorToClist() 299 sizeof(statistics->statisticsName[i]), metrics[i].name.c_str(), metrics[i].name.size()); in vectorToClist() 304 if (metrics[i].value.size() != 0) { in vectorToClist() 306 sizeof(statistics->statisticsDescription[i]), metrics[i].value.c_str(), metrics[i].value.size()); in vectorToClist() 322 std::vector<IMediaKeySystemService::MetircKeyValue> metrics; in OH_MediaKeySystem_GetStatistics() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/render/adapter/ |
H A D | txt_paragraph.cpp | 783 CaretMetricsF metrics; in CalcCaretMetricsByPosition() local 786 computeSuccess = ComputeOffsetForCaretDownstream(extent, metrics, needLineHighest) || in CalcCaretMetricsByPosition() 787 ComputeOffsetForCaretUpstream(extent, metrics, needLineHighest); in CalcCaretMetricsByPosition() 789 computeSuccess = ComputeOffsetForCaretUpstream(extent, metrics, needLineHighest) || in CalcCaretMetricsByPosition() 790 ComputeOffsetForCaretDownstream(extent, metrics, needLineHighest); in CalcCaretMetricsByPosition() 793 if (metrics.height <= 0 || std::isnan(metrics.height)) { in CalcCaretMetricsByPosition() 797 caretCaretMetric = metrics; in CalcCaretMetricsByPosition() 934 auto metrics = paragraphTxt->GetLineMetrics(); in GetLineMetricsByRectF() local 935 if (metrics in GetLineMetricsByRectF() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/rich_editor/ |
H A D | paragraph_manager.cpp | 438 CaretMetricsF metrics; in ComputeCursorOffset() local 441 computeSuccess = paragraph->ComputeOffsetForCaretDownstream(relativeIndex, metrics, needLineHighest) || in ComputeCursorOffset() 442 paragraph->ComputeOffsetForCaretUpstream(relativeIndex, metrics, needLineHighest); in ComputeCursorOffset() 444 computeSuccess = paragraph->ComputeOffsetForCaretUpstream(relativeIndex, metrics, needLineHighest) || in ComputeCursorOffset() 445 paragraph->ComputeOffsetForCaretDownstream(relativeIndex, metrics, needLineHighest); in ComputeCursorOffset() 448 selectLineHeight = metrics.height; in ComputeCursorOffset() 449 return { static_cast<float>(metrics.offset.GetX()), static_cast<float>(metrics.offset.GetY() + y) }; in ComputeCursorOffset()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/ |
H A D | skia_font.cpp | 133 scalar SkiaFont::GetMetrics(FontMetrics* metrics) const in GetMetrics() 135 if (!metrics) { in GetMetrics() 139 SkiaConvertUtils::DrawingFontMetricsCastToSkFontMetrics(*metrics, skFontMetrics); in GetMetrics() 141 SkiaConvertUtils::SkFontMetricsCastToDrawingFontMetrics(skFontMetrics, *metrics); in GetMetrics()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/skia_adapter/ |
H A D | skia_font_test.cpp | 149 auto metrics = skiaFont->GetMetrics(nullptr); in HWTEST_F() local 150 ASSERT_TRUE(metrics > 0); in HWTEST_F()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/export/rosen_text/ |
H A D | typography.h | 70 RunMetrics(const TextStyle* style, const Drawing::FontMetrics& metrics) in RunMetrics() argument 71 : textStyle(style), fontMetrics(metrics) {} in RunMetrics()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/ndk/ndkfont_fuzzer/ |
H A D | ndkfont_fuzzer.cpp | 230 OH_Drawing_Font_Metrics metrics; in NativeDrawingFontTest006() local 231 OH_Drawing_FontGetMetrics(font, &metrics); in NativeDrawingFontTest006() 232 OH_Drawing_FontGetMetrics(nullptr, &metrics); in NativeDrawingFontTest006()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/adapter/skia_txt/ |
H A D | typography.cpp | 359 auto metrics = paragraph_->GetLineMetrics(); in GetLineMetrics() local 360 lineMetricsStyles_.reserve(std::accumulate(metrics.begin(), metrics.end(), 0, in GetLineMetrics() 363 for (const skt::LineMetrics& skLineMetrics : metrics) { in GetLineMetrics()
|
/foundation/multimedia/drm_framework/services/drm_service/server/src/ |
H A D | mediakeysystem_service_stub.cpp | 253 std::vector<IMediaKeySystemService::MetircKeyValue> metrics;
in ProcessGetMetircs() local 254 int32_t ret = stub->GetStatistics(metrics);
in ProcessGetMetircs() 256 reply.WriteInt32(metrics.size());
in ProcessGetMetircs() 257 for (auto info : metrics) {
in ProcessGetMetircs()
|
H A D | mediakeysystem_service.cpp | 310 int32_t MediaKeySystemService::GetStatistics(std::vector<IMediaKeySystemService::MetircKeyValue> &metrics)
in GetStatistics() argument 327 metrics.push_back(keyValue);
in GetStatistics() 329 if (metrics.size() == 0) {
in GetStatistics()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/text/ |
H A D | font.cpp | 93 scalar Font::GetMetrics(FontMetrics* metrics) const in GetMetrics() 95 return fontImpl_->GetMetrics(metrics); in GetMetrics()
|
/foundation/multimedia/drm_framework/services/drm_service/client/include/ |
H A D | mediakeysystem_service_proxy.h | 39 int32_t GetStatistics(std::vector<IMediaKeySystemService::MetircKeyValue> &metrics) override;
|
/foundation/arkui/ui_lite/frameworks/font/ |
H A D | ui_font_vector.cpp | 514 return static_cast<uint16_t>(faceInfo.face->size->metrics.height / FONT_PIXEL_IN_POINT); in GetHeight() 617 fontHeader.ascender = static_cast<int16_t>(faceInfo.face->size->metrics.ascender / FONT_PIXEL_IN_POINT); in GetFontHeader() 618 fontHeader.descender = static_cast<int16_t>(faceInfo.face->size->metrics.descender / FONT_PIXEL_IN_POINT); in GetFontHeader() 619 fontHeader.fontHeight = static_cast<uint16_t>(faceInfo.face->size->metrics.height / FONT_PIXEL_IN_POINT); in GetFontHeader() 762 FT_Pos xBold = FT_MulFix(ftFaces_[fontId]->units_per_EM, ftFaces_[fontId]->size->metrics.y_scale) / 24; in SetBold() 1040 uint16_t height = static_cast<uint16_t>(ftFaces_[i]->size->metrics.height / FONT_PIXEL_IN_POINT); in GetMaxSubLineHeight() 1052 return static_cast<uint16_t>(ftFaces_[i]->size->metrics.height / FONT_PIXEL_IN_POINT); in GetMaxSubLineHeight() 1059 uint16_t tmpHeight = static_cast<uint16_t>(ftFaces_[i]->size->metrics.height / FONT_PIXEL_IN_POINT); in GetMaxSubLineHeight()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/skia_txt/impl/ |
H A D | paragraph_impl.cpp | 282 std::vector<skt::LineMetrics> metrics; in GetLineMetrics() local 284 paragraph_->getLineMetrics(metrics); in GetLineMetrics() 286 return metrics; in GetLineMetrics()
|