Skip to content

Commit

Permalink
Apply letter spacing via TextStyle instead of span
Browse files Browse the repository at this point in the history
Summary: This diff replaces the way we apply letter spacing at the moment for the DspText component by using a span. Instead we now leverage the TextStyle object which should match how we do that also in Litho and in [AS implementation](https://www.internalfb.com/code/fbsource/[4ffaede12082fed400fa076e2320721e6307db47]/fbandroid/java/com/instagram/fx/switcher/SwitcherCdsThemeHelper.java?lines=51).

Reviewed By: astreet

Differential Revision:
D55364499

Privacy Context Container: L1241033

fbshipit-source-id: 884148dfc3837808361962e2801478bf31493496
  • Loading branch information
AlexBalo authored and facebook-github-bot committed Mar 26, 2024
1 parent ae3a559 commit 1d2c826
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ public void setRoundedBackgroundColor(RoundedBackgroundProps roundedBackgroundPr
this.roundedBackgroundProps = roundedBackgroundProps;
}

public void setLetterSpacing(float letterSpacing) {
this.letterSpacing = letterSpacing;
}

public static class RoundedBackgroundProps {
final RectF padding;
final float cornerRadius;
Expand Down

0 comments on commit 1d2c826

Please sign in to comment.