/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/ |
H A D | text_model_impl.cpp | 35 auto textStyle = textComponent->GetTextStyle(); in Create() local 36 textStyle.SetAllowScale(false); in Create() 38 textStyle.SetFontSize(fontSize); in Create() 39 textComponent->SetTextStyle(textStyle); in Create() 49 auto textStyle = component->GetTextStyle(); in SetFontSize() local 50 textStyle.SetFontSize(value); in SetFontSize() 51 component->SetTextStyle(textStyle); in SetFontSize() 59 auto textStyle = component->GetTextStyle(); in SetTextColor() local 60 textStyle.SetTextColor(value); in SetTextColor() 61 component->SetTextStyle(textStyle); in SetTextColor() 73 auto textStyle = component->GetTextStyle(); SetItalicFontStyle() local 83 auto textStyle = component->GetTextStyle(); SetFontWeight() local 97 auto textStyle = component->GetTextStyle(); SetFontFamily() local 107 auto textStyle = component->GetTextStyle(); SetTextAlign() local 116 auto textStyle = component->GetTextStyle(); SetTextOverflow() local 126 auto textStyle = component->GetTextStyle(); SetMaxLines() local 136 auto textStyle = component->GetTextStyle(); SetTextIndent() local 146 auto textStyle = component->GetTextStyle(); SetLineHeight() local 155 auto textStyle = component->GetTextStyle(); SetTextDecoration() local 164 auto textStyle = component->GetTextStyle(); SetTextDecorationColor() local 173 auto textStyle = component->GetTextStyle(); SetTextDecorationStyle() local 183 auto textStyle = component->GetTextStyle(); SetBaselineOffset() local 193 auto textStyle = component->GetTextStyle(); SetTextCase() local 203 auto textStyle = component->GetTextStyle(); SetLetterSpacing() local 215 auto textStyle = component->GetTextStyle(); SetAdaptMinFontSize() local 225 auto textStyle = component->GetTextStyle(); SetAdaptMaxFontSize() local [all...] |
H A D | span_model_impl.cpp | 28 auto textStyle = spanComponent->GetTextStyle(); in Create() local 29 textStyle.SetAllowScale(false); in Create() 30 spanComponent->SetTextStyle(textStyle); in Create() 40 auto textStyle = component->GetTextStyle(); in SetFontSize() local 41 textStyle.SetFontSize(value); in SetFontSize() 42 component->SetTextStyle(textStyle); in SetFontSize() 54 auto textStyle = component->GetTextStyle(); in SetTextColor() local 55 textStyle.SetTextColor(value); in SetTextColor() 56 component->SetTextStyle(textStyle); in SetTextColor() 67 auto textStyle in SetItalicFontStyle() local 82 auto textStyle = component->GetTextStyle(); SetFontWeight() local 97 auto textStyle = component->GetTextStyle(); SetFontFamily() local 111 auto textStyle = component->GetTextStyle(); SetTextDecoration() local 120 auto textStyle = component->GetTextStyle(); SetTextDecorationColor() local 129 auto textStyle = component->GetTextStyle(); SetTextDecorationStyle() local 138 auto textStyle = component->GetTextStyle(); SetTextCase() local 153 auto textStyle = component->GetTextStyle(); SetLetterSpacing() local [all...] |
H A D | text_clock_model_impl.cpp | 56 auto textStyle = component->GetTextStyle(); in SetFontSize() local 57 textStyle.SetFontSize(value); in SetFontSize() 58 component->SetTextStyle(textStyle); in SetFontSize() 66 auto textStyle = component->GetTextStyle(); in SetTextColor() local 67 textStyle.SetTextColor(value); in SetTextColor() 68 component->SetTextStyle(textStyle); in SetTextColor() 76 auto textStyle = component->GetTextStyle(); in SetItalicFontStyle() local 77 textStyle.SetFontStyle(value); in SetItalicFontStyle() 78 component->SetTextStyle(textStyle); in SetItalicFontStyle() 86 auto textStyle in SetFontWeight() local 96 auto textStyle = component->GetTextStyle(); SetFontFamily() local 101 InitFontDefault(const TextStyle& textStyle) InitFontDefault() argument [all...] |
H A D | text_timer_model_impl.cpp | 62 auto textStyle = component->GetTextStyle(); in SetFontSize() local 63 textStyle.SetFontSize(value); in SetFontSize() 64 component->SetTextStyle(textStyle); in SetFontSize() 72 auto textStyle = component->GetTextStyle(); in SetTextColor() local 73 textStyle.SetTextColor(value); in SetTextColor() 74 component->SetTextStyle(textStyle); in SetTextColor() 82 auto textStyle = component->GetTextStyle(); in SetItalicFontStyle() local 83 textStyle.SetFontStyle(value); in SetItalicFontStyle() 84 component->SetTextStyle(textStyle); in SetItalicFontStyle() 92 auto textStyle in SetFontWeight() local 102 auto textStyle = component->GetTextStyle(); SetFontFamily() local [all...] |
/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/adapter/skia_txt/ |
H A D | convert.cpp | 118 void CopyTextStyleSymbol(const TextStyle& style, SPText::TextStyle& textStyle) in CopyTextStyleSymbol() argument 120 textStyle.symbol.SetRenderColor(style.symbol.GetRenderColor()); in CopyTextStyleSymbol() 121 textStyle.symbol.SetRenderMode(style.symbol.GetRenderMode()); in CopyTextStyleSymbol() 122 textStyle.symbol.SetSymbolEffect(style.symbol.GetEffectStrategy()); in CopyTextStyleSymbol() 123 textStyle.symbol.SetAnimationMode(style.symbol.GetAnimationMode()); in CopyTextStyleSymbol() 124 textStyle.symbol.SetRepeatCount(style.symbol.GetRepeatCount()); in CopyTextStyleSymbol() 125 textStyle.symbol.SetAnimationStart(style.symbol.GetAnimationStart()); in CopyTextStyleSymbol() 126 textStyle.symbol.SetCommonSubType(style.symbol.GetCommonSubType()); in CopyTextStyleSymbol() 128 textStyle.fontFeatures.SetFeature(RemoveQuotes(tag), value); in CopyTextStyleSymbol() 132 void SplitTextStyleConvert(SPText::TextStyle& textStyle, cons argument 166 SPText::TextStyle textStyle; Convert() local 198 CopyTextStyleSymbol(const SPText::TextStyle& style, TextStyle& textStyle) CopyTextStyleSymbol() argument 209 SplitTextStyleConvert(TextStyle& textStyle, const SPText::TextStyle& style) SplitTextStyleConvert() argument 245 TextStyle textStyle; Convert() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/components/option/ |
H A D | option_component.cpp | 83 TextStyle textStyle; in Initialize() local 86 textStyle = GetSelectedTextStyle(); in Initialize() 87 text_->SetTextStyle(textStyle); in Initialize() 89 textStyle = GetTextStyle(); in Initialize() 90 text_->SetTextStyle(textStyle); in Initialize() 92 textStyle.SetFontSize(GetFontSize()); in Initialize() 93 textStyle.SetTextDecoration(GetTextDecoration()); in Initialize() 96 textStyle = text_->GetTextStyle(); in Initialize() 100 textStyle.SetFontFamilies(fontFamilies); in Initialize() 102 textStyle in Initialize() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/ |
H A D | text_adapt_font_sizer.cpp | 19 bool TextAdaptFontSizer::AdaptMaxFontSize(TextStyle& textStyle, const std::string& content, in AdaptMaxFontSize() argument 24 GetAdaptMaxMinFontSize(textStyle, maxFontSize, minFontSize, contentConstraint); in AdaptMaxFontSize() 27 return CreateParagraphAndLayout(textStyle, content, contentConstraint, layoutWrapper, false); in AdaptMaxFontSize() 30 GetAdaptFontSizeStep(textStyle, stepSize, stepUnit, contentConstraint); in AdaptMaxFontSize() 35 textStyle.SetFontSize(Dimension(minFontSize)); in AdaptMaxFontSize() 36 if (!CreateParagraphAndLayout(textStyle, content, contentConstraint, layoutWrapper)) { in AdaptMaxFontSize() 50 textStyle.SetFontSize(Dimension(fontSize)); in AdaptMaxFontSize() 51 if (!CreateParagraphAndLayout(textStyle, content, contentConstraint, layoutWrapper)) { in AdaptMaxFontSize() 63 textStyle.SetFontSize(Dimension(fontSize)); in AdaptMaxFontSize() 64 return CreateParagraphAndLayout(textStyle, conten in AdaptMaxFontSize() 67 AdaptMinFontSize(TextStyle& textStyle, const std::string& content, const Dimension& stepUnit, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) AdaptMinFontSize() argument 93 GetAdaptMaxMinFontSize(const TextStyle& textStyle, double& maxFontSize, double& minFontSize, const LayoutConstraintF& contentConstraint) GetAdaptMaxMinFontSize() argument 102 GetAdaptFontSizeStep(const TextStyle& textStyle, double& stepSize, const Dimension& stepUnit, const LayoutConstraintF& contentConstraint) GetAdaptFontSizeStep() argument 146 IsNeedAdaptFontSize(const TextStyle& textStyle, const LayoutConstraintF& contentConstraint) IsNeedAdaptFontSize() argument 154 SetAdaptFontSizeLineHeight(const Dimension& lineHeight, const TextStyle& textStyle) SetAdaptFontSizeLineHeight() argument [all...] |
H A D | text_layout_algorithm.cpp | 109 TextStyle textStyle; in MeasureContent() local 110 ConstructTextStyles(contentConstraint, layoutWrapper, textStyle); in MeasureContent() 113 if (textStyle.GetTextOverflow() == TextOverflow::MARQUEE) { // create a paragraph with all text in 1 line in MeasureContent() 115 return BuildTextRaceParagraph(textStyle, textLayoutProperty, contentConstraint, layoutWrapper); in MeasureContent() 119 textStyle.SetMaxLines(UINT32_MAX); in MeasureContent() 121 textStyle_ = textStyle; in MeasureContent() 122 BuildParagraph(textStyle, textLayoutProperty, contentConstraint, layoutWrapper); in MeasureContent() 124 if (!AddPropertiesAndAnimations(textStyle, textLayoutProperty, contentConstraint, layoutWrapper)) { in MeasureContent() 128 textStyle_ = textStyle; in MeasureContent() 129 baselineOffset_ = textStyle in MeasureContent() 154 AddPropertiesAndAnimations(TextStyle& textStyle, const RefPtr<TextLayoutProperty>& textLayoutProperty, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) AddPropertiesAndAnimations() argument 176 UpdateParagraphForAISpan( const TextStyle& textStyle, LayoutWrapper* layoutWrapper, const RefPtr<Paragraph>& paragraph) UpdateParagraphForAISpan() argument 222 GrayDisplayAISpan(const DragSpanPosition& dragSpanPosition, const std::wstring wTextForAI, const TextStyle& textStyle, bool isDragging, const RefPtr<Paragraph>& paragraph) GrayDisplayAISpan() argument 262 CreateParagraph( const TextStyle& textStyle, std::string content, LayoutWrapper* layoutWrapper, double maxWidth) CreateParagraph() argument 302 UpdateSymbolTextStyle(const TextStyle& textStyle, const ParagraphStyle& paraStyle, LayoutWrapper* layoutWrapper, RefPtr<FrameNode>& frameNode) UpdateSymbolTextStyle() argument 336 CreateParagraphDrag( const TextStyle& textStyle, const std::vector<std::string>& contents, const RefPtr<Paragraph>& paragraph) CreateParagraphDrag() argument 360 CreateParagraphAndLayout(const TextStyle& textStyle, const std::string& content, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper, bool needLayout) CreateParagraphAndLayout() argument 384 AdaptMinTextSize(TextStyle& textStyle, const std::string& content, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) AdaptMinTextSize() argument 420 GetSuitableSize(TextStyle& textStyle, const std::string& content, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) GetSuitableSize() argument 446 GetSuitableSizeLD(TextStyle& textStyle, const std::string& content, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper, double stepSize) GetSuitableSizeLD() argument 471 GetSuitableSizeBS(TextStyle& textStyle, const std::string& content, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper, double stepSize) GetSuitableSizeBS() argument 519 UpdateSingleParagraph(LayoutWrapper* layoutWrapper, ParagraphStyle paraStyle, const TextStyle& textStyle, const std::string& content, double maxWidth) UpdateSingleParagraph() argument 565 BuildParagraph(TextStyle& textStyle, const RefPtr<TextLayoutProperty>& layoutProperty, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) BuildParagraph() argument 587 BuildParagraphAdaptUseMinFontSize(TextStyle& textStyle, const RefPtr<TextLayoutProperty>& layoutProperty, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) BuildParagraphAdaptUseMinFontSize() argument 611 BuildParagraphAdaptUseLayoutConstraint(TextStyle& textStyle, const RefPtr<TextLayoutProperty>& layoutProperty, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) BuildParagraphAdaptUseLayoutConstraint() argument 645 BuildTextRaceParagraph(TextStyle& textStyle, const RefPtr<TextLayoutProperty>& layoutProperty, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) BuildTextRaceParagraph() argument 692 AdaptMaxTextSize(TextStyle& textStyle, const std::string& content, const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper) AdaptMaxTextSize() argument [all...] |
H A D | text_content_modifier.h | 40 explicit TextContentModifier(const std::optional<TextStyle>& textStyle, const WeakPtr<Pattern>& pattern = nullptr); 46 void SetFontSize(const Dimension& value, const TextStyle& textStyle, bool isReset = false); 47 void SetAdaptMinFontSize(const Dimension& value, const TextStyle& textStyle, bool isReset = false); 48 void SetAdaptMaxFontSize(const Dimension& value, const TextStyle& textStyle, bool isReset = false); 55 void SetBaselineOffset(const Dimension& value, const TextStyle& textStyle, bool isReset = false); 61 void ModifyTextStyle(TextStyle& textStyle); 104 void SetDefaultAnimatablePropertyValue(const TextStyle& textStyle); 105 void SetDefaultFontSize(const TextStyle& textStyle); 106 void SetDefaultAdaptMinFontSize(const TextStyle& textStyle); 107 void SetDefaultAdaptMaxFontSize(const TextStyle& textStyle); [all...] |
H A D | text_layout_algorithm.h | 62 bool CreateParagraphAndLayout(const TextStyle& textStyle, const std::string& content, 85 const TextStyle& textStyle, LayoutWrapper* layoutWrapper, const RefPtr<Paragraph>& paragraph); 88 const TextStyle& textStyle, bool isDragging, const RefPtr<Paragraph>& paragraph); 94 bool UpdateSingleParagraph(LayoutWrapper* layoutWrapper, ParagraphStyle paraStyle, const TextStyle& textStyle, 96 bool UpdateSymbolTextStyle(const TextStyle& textStyle, const ParagraphStyle& paraStyle, 99 const TextStyle& textStyle, const std::vector<std::string>& contents, const RefPtr<Paragraph>& paragraph); 101 bool AdaptMinTextSize(TextStyle& textStyle, const std::string& content, const LayoutConstraintF& contentConstraint, 103 bool AddPropertiesAndAnimations(TextStyle& textStyle, const RefPtr<TextLayoutProperty>& textLayoutProperty, 106 const TextStyle& textStyle, std::string content, LayoutWrapper* layoutWrapper, double maxWidth = 0.0) override; 107 bool BuildParagraph(TextStyle& textStyle, cons [all...] |
H A D | multiple_paragraph_layout_algorithm.cpp | 52 const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper, TextStyle& textStyle) in ConstructTextStyles() 68 textStyle = CreateTextStyleUsingTheme( in ConstructTextStyles() 73 textStyle.SetFontFamilies(Framework::ConvertStrToFontFamilies(fontManager->GetAppCustomFont())); in ConstructTextStyles() 77 SetPropertyToModifier(textLayoutProperty, contentModifier, textStyle); in ConstructTextStyles() 78 contentModifier->ModifyTextStyle(textStyle); in ConstructTextStyles() 82 textStyle.SetHalfLeading(textLayoutProperty->GetHalfLeadingValue(pipeline->GetHalfLeading())); in ConstructTextStyles() 83 SetAdaptFontSizeStepToTextStyle(textStyle, textLayoutProperty->GetAdaptFontSizeStep()); in ConstructTextStyles() 85 FontRegisterCallback(frameNode, textStyle); in ConstructTextStyles() 88 UpdateTextColorIfForeground(frameNode, textStyle); in ConstructTextStyles() 89 textStyle_ = textStyle; in ConstructTextStyles() 51 ConstructTextStyles( const LayoutConstraintF& contentConstraint, LayoutWrapper* layoutWrapper, TextStyle& textStyle) ConstructTextStyles() argument 210 FontRegisterCallback( const RefPtr<FrameNode>& frameNode, const TextStyle& textStyle) FontRegisterCallback() argument 245 UpdateTextColorIfForeground( const RefPtr<FrameNode>& frameNode, TextStyle& textStyle) UpdateTextColorIfForeground() argument 254 SetFontSizePropertyToModifier(const RefPtr<TextLayoutProperty>& layoutProperty, const RefPtr<TextContentModifier>& modifier, const TextStyle& textStyle) SetFontSizePropertyToModifier() argument 280 SetDecorationPropertyToModifier(const RefPtr<TextLayoutProperty>& layoutProperty, const RefPtr<TextContentModifier>& modifier, const TextStyle& textStyle) SetDecorationPropertyToModifier() argument 303 SetPropertyToModifier(const RefPtr<TextLayoutProperty>& layoutProperty, const RefPtr<TextContentModifier>& modifier, const TextStyle& textStyle) SetPropertyToModifier() argument 372 SetAdaptFontSizeStepToTextStyle( TextStyle& textStyle, const std::optional<Dimension>& adaptFontSizeStep) SetAdaptFontSizeStepToTextStyle() argument 378 GetParagraphStyle( const TextStyle& textStyle, const std::string& content, LayoutWrapper* layoutWrapper) const GetParagraphStyle() argument 449 UpdateParagraphBySpan(LayoutWrapper* layoutWrapper, ParagraphStyle paraStyle, double maxWidth, const TextStyle& textStyle) UpdateParagraphBySpan() argument 572 TextStyle textStyle = textStyle_.value_or(TextStyle()); InheritParentTextStyle() local 597 AddImageToParagraph(RefPtr<ImageSpanItem>& imageSpanItem, const RefPtr<LayoutWrapper>& layoutWrapper, const LayoutConstraintF& layoutConstrain, const RefPtr<Paragraph>& paragraph, int32_t& spanTextLength, const TextStyle& textStyle) AddImageToParagraph() argument 709 ApplyIndent( ParagraphStyle& paragraphStyle, const RefPtr<Paragraph>& paragraph, double width, const TextStyle& textStyle) ApplyIndent() argument [all...] |
/foundation/arkui/ace_engine/test/unittest/core/pattern/text_input/ |
H A D | text_field_algorithm_test.cpp | 56 TextStyle textStyle; in HWTEST_F() local 57 textStyle.SetTextOverflow(OVERFLOW_DEFAULT); in HWTEST_F() 58 textInputLayoutAlgorithm->UpdateTextStyleTextOverflowAndWordBreak(textStyle, true, true, layoutProperty_); in HWTEST_F() 59 EXPECT_EQ(textStyle.GetTextOverflow(), TextOverflow::CLIP); in HWTEST_F() 61 textInputLayoutAlgorithm->UpdateTextStyleTextOverflowAndWordBreak(textStyle, true, true, layoutProperty_); in HWTEST_F() 62 EXPECT_EQ(textStyle.GetTextOverflow(), OVERFLOW_ELLIPSIS); in HWTEST_F() 78 TextStyle textStyle; in HWTEST_F() local 79 textStyle.SetTextOverflow(OVERFLOW_ELLIPSIS); in HWTEST_F() 81 textInputLayoutAlgorithm->UpdateTextStyleTextOverflowAndWordBreak(textStyle, true, true, layoutProperty_); in HWTEST_F() 82 EXPECT_EQ(textStyle in HWTEST_F() 98 TextStyle textStyle; HWTEST_F() local 119 TextStyle textStyle; HWTEST_F() local 139 TextStyle textStyle; HWTEST_F() local 158 TextStyle textStyle; HWTEST_F() local 176 TextStyle textStyle; HWTEST_F() local 197 TextStyle textStyle; HWTEST_F() local 220 TextStyle textStyle; HWTEST_F() local 413 TextStyle textStyle; HWTEST_F() local 433 TextStyle textStyle; HWTEST_F() local 454 TextStyle textStyle; HWTEST_F() local 475 TextStyle textStyle; HWTEST_F() local 502 TextStyle textStyle; HWTEST_F() local 529 TextStyle textStyle; HWTEST_F() local 558 TextStyle textStyle; HWTEST_F() local 587 TextStyle textStyle; HWTEST_F() local 616 TextStyle textStyle; HWTEST_F() local 645 TextStyle textStyle; HWTEST_F() local 686 TextStyle textStyle; HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/ark_theme/theme_apply/ |
H A D | js_date_picker_theme.h | 36 NG::PickerTextStyle textStyle; in ApplyTheme() local 38 textStyle.textColor = themeColors.value().FontEmphasize(); in ApplyTheme() 39 textStyle.fontSize = selectedStyle.GetFontSize(); in ApplyTheme() 40 textStyle.fontWeight = selectedStyle.GetFontWeight(); in ApplyTheme() 41 DatePickerModel::GetInstance()->SetSelectedTextStyle(themePicker, textStyle); in ApplyTheme() 44 textStyle.textColor = themeColors.value().FontPrimary(); in ApplyTheme() 45 textStyle.fontSize = disappearStyle.GetFontSize(); in ApplyTheme() 46 textStyle.fontWeight = disappearStyle.GetFontWeight(); in ApplyTheme() 47 DatePickerModel::GetInstance()->SetDisappearTextStyle(themePicker, textStyle); in ApplyTheme() 50 textStyle in ApplyTheme() 61 ObtainSelectedTextStyle(NG::PickerTextStyle& textStyle) ObtainSelectedTextStyle() argument 70 ObtainTextStyle(NG::PickerTextStyle& textStyle) ObtainTextStyle() argument [all...] |
H A D | js_text_picker_theme.h | 36 NG::PickerTextStyle textStyle; in ApplyTheme() local 38 textStyle.textColor = themeColors.value().FontEmphasize(); in ApplyTheme() 39 textStyle.fontSize = selectedStyle.GetFontSize(); in ApplyTheme() 40 textStyle.fontWeight = selectedStyle.GetFontWeight(); in ApplyTheme() 41 TextPickerModel::GetInstance()->SetSelectedTextStyle(themePicker, textStyle); in ApplyTheme() 44 textStyle.textColor = themeColors.value().FontPrimary(); in ApplyTheme() 45 textStyle.fontSize = disappearStyle.GetFontSize(); in ApplyTheme() 46 textStyle.fontWeight = disappearStyle.GetFontWeight(); in ApplyTheme() 47 TextPickerModel::GetInstance()->SetDisappearTextStyle(themePicker, textStyle); in ApplyTheme() 50 textStyle in ApplyTheme() 60 ObtainSelectedTextStyle(NG::PickerTextStyle& textStyle) ObtainSelectedTextStyle() argument 69 ObtainTextStyle(NG::PickerTextStyle& textStyle) ObtainTextStyle() argument [all...] |
H A D | js_time_picker_theme.h | 36 NG::PickerTextStyle textStyle; in ApplyTheme() local 38 textStyle.textColor = themeColors.value().FontEmphasize(); in ApplyTheme() 39 textStyle.fontSize = selectedStyle.GetFontSize(); in ApplyTheme() 40 textStyle.fontWeight = selectedStyle.GetFontWeight(); in ApplyTheme() 41 TimePickerModel::GetInstance()->SetSelectedTextStyle(themePicker, textStyle); in ApplyTheme() 44 textStyle.textColor = themeColors.value().FontPrimary(); in ApplyTheme() 45 textStyle.fontSize = disappearStyle.GetFontSize(); in ApplyTheme() 46 textStyle.fontWeight = disappearStyle.GetFontWeight(); in ApplyTheme() 47 TimePickerModel::GetInstance()->SetDisappearTextStyle(themePicker, textStyle); in ApplyTheme() 50 textStyle in ApplyTheme() 61 ObtainSelectedTextStyle(NG::PickerTextStyle& textStyle) ObtainSelectedTextStyle() argument 70 ObtainTextStyle(NG::PickerTextStyle& textStyle) ObtainTextStyle() argument [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/render/ |
H A D | drawing_prop_convertor.cpp | 209 RSTextStyle ToRSTextStyle(const RefPtr<PipelineBase>& context, const TextStyle& textStyle) in ToRSTextStyle() argument 213 rsTextStyle.color_ = ToRSColor(textStyle.GetTextColor()); in ToRSTextStyle() 214 rsTextStyle.decoration_ = ToRSTextDecoration(textStyle.GetTextDecoration()); in ToRSTextStyle() 215 rsTextStyle.decorationStyle_ = ToRSTextDecorationStyle(textStyle.GetTextDecorationStyle()); in ToRSTextStyle() 216 rsTextStyle.decorationColor_ = ToRSColor(textStyle.GetTextDecorationColor()); in ToRSTextStyle() 218 rsTextStyle.color = ToRSColor(textStyle.GetTextColor()); in ToRSTextStyle() 219 rsTextStyle.decoration = ToRSTextDecoration(textStyle.GetTextDecoration()); in ToRSTextStyle() 220 rsTextStyle.decorationColor = ToRSColor(textStyle.GetTextDecorationColor()); in ToRSTextStyle() 224 rsTextStyle.fontWeight_ = ToRSFontWeight(textStyle.GetFontWeight()); in ToRSTextStyle() 225 rsTextStyle.fontStyle_ = static_cast<RSFontStyle>(textStyle in ToRSTextStyle() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components/text/ |
H A D | text_component_v2.cpp | 46 auto textStyle = GetTextStyle(); in CheckAndSetChildStyle() local 49 spanStyle.SetFontSize(textStyle.GetFontSize()); in CheckAndSetChildStyle() 52 spanStyle.SetFontStyle(textStyle.GetFontStyle()); in CheckAndSetChildStyle() 55 spanStyle.SetTextColor(textStyle.GetTextColor()); in CheckAndSetChildStyle() 58 spanStyle.SetFontWeight(textStyle.GetFontWeight()); in CheckAndSetChildStyle() 61 spanStyle.SetTextDecoration(textStyle.GetTextDecoration()); in CheckAndSetChildStyle() 62 spanStyle.SetTextDecorationColor(textStyle.GetTextDecorationColor()); in CheckAndSetChildStyle() 63 spanStyle.SetTextDecorationStyle(textStyle.GetTextDecorationStyle()); in CheckAndSetChildStyle() 67 spanStyle.SetFontFamilies(textStyle.GetFontFamilies()); in CheckAndSetChildStyle() 70 spanStyle.SetAllowScale(textStyle in CheckAndSetChildStyle() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components/font/ |
H A D | constants_converter.cpp | 484 void ConvertTxtStyle(const TextStyle& textStyle, const WeakPtr<PipelineBase>& context, txt::TextStyle& txtStyle) in ConvertTxtStyle() argument 486 txtStyle.color = ConvertSkColor(textStyle.GetTextColor()); in ConvertTxtStyle() 487 txtStyle.font_weight = ConvertTxtFontWeight(textStyle.GetFontWeight()); in ConvertTxtStyle() 489 ConvertTxtFontWeight(textStyle.GetFontWeight())) + 1) * DEFAULT_MULTIPLE; in ConvertTxtStyle() 494 if (textStyle.GetEnableVariableFontWeight()) { in ConvertTxtStyle() 495 fontWeightValue = textStyle.GetVariableFontWeight(); in ConvertTxtStyle() 503 txtStyle.font_size = pipelineContext->NormalizeToPx(textStyle.GetFontSize()); in ConvertTxtStyle() 504 if (textStyle.IsAllowScale() && textStyle.GetFontSize().Unit() == DimensionUnit::FP) { in ConvertTxtStyle() 506 pipelineContext->NormalizeToPx(textStyle in ConvertTxtStyle() 581 ConvertTxtStyle(const TextStyle& textStyle, txt::TextStyle& txtStyle) ConvertTxtStyle() argument 583 ConvertSymbolTxtStyle(const TextStyle& textStyle, txt::TextStyle& txtStyle) ConvertSymbolTxtStyle() argument 633 ConvertTxtStyle(const TextStyle& textStyle, Rosen::TextStyle& txtStyle) ConvertTxtStyle() argument 715 ConvertTxtStyle(const TextStyle& textStyle, const WeakPtr<PipelineBase>& context, Rosen::TextStyle& txtStyle) ConvertTxtStyle() argument 859 ConvertSymbolTxtStyle(const TextStyle& textStyle, Rosen::TextStyle& txtStyle) ConvertSymbolTxtStyle() argument [all...] |
/foundation/graphic/graphic_2d/rosen/test/2d_engine/unittest/rosen_text/hm_symbol/ |
H A D | hm_symbol_txt_test.cpp | 36 SPText::TextStyle textStyle; in HWTEST_F() local 38 textStyle = AdapterTxt::Convert(style); in HWTEST_F() 39 EXPECT_EQ(textStyle.isSymbolGlyph, true); in HWTEST_F() 51 SPText::TextStyle textStyle; in HWTEST_F() local 53 textStyle = AdapterTxt::Convert(style); in HWTEST_F() 54 EXPECT_EQ(textStyle.symbol.GetRenderMode(), Drawing::DrawingSymbolRenderingStrategy::SINGLE); in HWTEST_F() 57 textStyle = AdapterTxt::Convert(style); in HWTEST_F() 58 EXPECT_EQ(textStyle.symbol.GetRenderMode(), Drawing::DrawingSymbolRenderingStrategy::MULTIPLE_OPACITY); in HWTEST_F() 61 textStyle = AdapterTxt::Convert(style); in HWTEST_F() 62 EXPECT_EQ(textStyle in HWTEST_F() 77 SPText::TextStyle textStyle; HWTEST_F() local 124 SPText::TextStyle textStyle; HWTEST_F() local 171 SPText::TextStyle textStyle; HWTEST_F() local 194 SPText::TextStyle textStyle; HWTEST_F() local 210 SPText::TextStyle textStyle; HWTEST_F() local 225 SPText::TextStyle textStyle; HWTEST_F() local 248 SPText::TextStyle textStyle; HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/cj_frontend/interfaces/cj_ffi/ |
H A D | cj_datepicker_ffi.cpp | 158 NG::PickerTextStyle textStyle; in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() local 160 textStyle.textColor = selectedStyle.GetTextColor(); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 161 textStyle.fontSize = selectedStyle.GetFontSize(); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 162 textStyle.fontWeight = selectedStyle.GetFontWeight(); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 163 DatePickerModel::GetInstance()->SetSelectedTextStyle(theme, textStyle); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 166 textStyle.textColor = disappearStyle.GetTextColor(); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 167 textStyle.fontSize = disappearStyle.GetFontSize(); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 168 textStyle.fontWeight = disappearStyle.GetFontWeight(); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 169 DatePickerModel::GetInstance()->SetDisappearTextStyle(theme, textStyle); in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 172 textStyle in FfiOHOSAceFrameworkDatePickerSetDefaultAttributes() 188 NG::PickerTextStyle textStyle; FfiOHOSAceFrameworkDatePickerSetDisappearTextStyle() local 209 NG::PickerTextStyle textStyle; FfiOHOSAceFrameworkDatePickerSetTextStyle() local 230 NG::PickerTextStyle textStyle; FfiOHOSAceFrameworkDatePickerSetSelectedTextStyle() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/render/adapter/ |
H A D | span_model_adapter.cpp | 44 auto* textStyle = reinterpret_cast<RSTextStyle*>(item->textStyle); in CreateSpanItem() local 45 if (!textStyle) { in CreateSpanItem() 50 UPDATE_SPAN_FONT_STYLE_ITEM(spanItem, FontSize, Dimension(textStyle->fontSize)); in CreateSpanItem() 52 Color::FromARGB(textStyle->color.GetAlpha(), textStyle->color.GetRed(), textStyle->color.GetGreen(), in CreateSpanItem() 53 textStyle->color.GetBlue())); in CreateSpanItem() 54 UPDATE_SPAN_FONT_STYLE_ITEM(spanItem, ItalicFontStyle, static_cast<Ace::FontStyle>(textStyle->fontStyle)); in CreateSpanItem() 55 UPDATE_SPAN_FONT_STYLE_ITEM(spanItem, FontWeight, static_cast<FontWeight>(textStyle in CreateSpanItem() [all...] |
/foundation/arkui/ace_engine/test/unittest/core/render/ |
H A D | drawing_prop_convertor_test_ng.cpp | 350 * @tc.steps1: create textStyle object. in HWTEST_F() 352 TextStyle textStyle(FONT_FAMILIES, FONT_SIZE, FONT_WEIGHT, FONT_STYLE, TEXT_COLOR_RED); in HWTEST_F() 359 RSTextStyle retTextStyle = ToRSTextStyle(context, textStyle); in HWTEST_F() 366 * @tc.steps3: call ToRSTextStyle and set input textStyle.textOverflow_ is TextOverflow::ELLIPSIS. in HWTEST_F() 369 textStyle.textOverflow_ = TextOverflow::ELLIPSIS; in HWTEST_F() 370 textStyle.wordSpacing_ = WORD_SPACING_PX; in HWTEST_F() 371 retTextStyle = ToRSTextStyle(context, textStyle); in HWTEST_F() 386 * @tc.steps4: call ToRSTextStyle and set input textStyle.lineHeight_ is not equal to textStyle.fontSize_. in HWTEST_F() 389 textStyle in HWTEST_F() 609 TextStyle textStyle; HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/components/tab_bar/ |
H A D | tab_bar_item_component.cpp | 44 TextStyle textStyle; in TabBarItemComponent() local 45 textStyle.SetTextAlign(TextAlign::CENTER); in TabBarItemComponent() 46 textStyle.SetMaxLines(1); in TabBarItemComponent() 47 textStyle.SetTextOverflow(TextOverflow::CLIP); in TabBarItemComponent() 48 text_->SetTextStyle(textStyle); in TabBarItemComponent() 84 void TabBarItemComponent::UpdateStyle(const TextStyle& textStyle, const Color& color) in UpdateStyle() argument 95 text->SetTextStyle(textStyle); in UpdateStyle() 116 auto textStyle = textComponent->GetTextStyle(); in BuildWithTextIcon() local 117 textStyle.SetFontSize(DEFAULT_SMALL_TEXT_FONT_SIZE); in BuildWithTextIcon() 118 textStyle in BuildWithTextIcon() 131 auto textStyle = text->GetTextStyle(); BuildWithTextIcon() local [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/common/dom/ |
H A D | dom_text.cpp | 60 const auto& textStyle = textDeclaration->GetTextStyle(); in CheckAndSetSpanStyle() local 62 spanStyle.SetFontSize(textStyle.GetFontSize()); in CheckAndSetSpanStyle() 65 spanStyle.SetFontStyle(textStyle.GetFontStyle()); in CheckAndSetSpanStyle() 68 spanStyle.SetTextColor(textStyle.GetTextColor()); in CheckAndSetSpanStyle() 71 spanStyle.SetFontWeight(textStyle.GetFontWeight()); in CheckAndSetSpanStyle() 74 spanStyle.SetTextDecoration(textStyle.GetTextDecoration()); in CheckAndSetSpanStyle() 77 spanStyle.SetTextDecorationColor(textStyle.GetTextDecorationColor()); in CheckAndSetSpanStyle() 80 spanStyle.SetTextDecorationStyle(textStyle.GetTextDecorationStyle()); in CheckAndSetSpanStyle() 83 spanStyle.SetFontFamilies(textStyle.GetFontFamilies()); in CheckAndSetSpanStyle() 86 spanStyle.SetAllowScale(textStyle in CheckAndSetSpanStyle() [all...] |
/foundation/graphic/graphic_2d/rosen/test/2d_engine/unittest/rosen_text/skia_txt/ |
H A D | paragraph_builder_test.cpp | 138 TextStyle textStyle; in HWTEST_F() local 139 textStyle.locale = localeEN; in HWTEST_F() 141 paragraphBuilder_->PushStyle(textStyle); in HWTEST_F() 154 TextStyle textStyle; in HWTEST_F() local 155 textStyle.fontStyle = FontStyle::ITALIC; in HWTEST_F() 156 paragraphBuilder_->PushStyle(textStyle); in HWTEST_F() 168 TextStyle textStyle; in HWTEST_F() local 169 textStyle.fontStyle = FontStyle::OBLIQUE; in HWTEST_F() 170 paragraphBuilder_->PushStyle(textStyle); in HWTEST_F() 182 TextStyle textStyle; in HWTEST_F() local 197 TextStyle textStyle; HWTEST_F() local 216 TextStyle textStyle; HWTEST_F() local 230 TextStyle textStyle; HWTEST_F() local [all...] |