Skip to content

Commit

Permalink
CustomStyleSpan: Move the class comment (#42700)
Browse files Browse the repository at this point in the history
Summary:
`CustomStyleSpan`: Move the class comment (it was misplaced)

## Changelog:

[INTERNAL] [FIXED] - `CustomStyleSpan`: Move the class comment

Pull Request resolved: #42700

Reviewed By: yungsters

Differential Revision: D53195908

Pulled By: NickGerleman

fbshipit-source-id: f77575e16f76871dcf10d75448282b2166003412
  • Loading branch information
cubuspl42 authored and facebook-github-bot committed Jan 31, 2024
1 parent 9c0fe73 commit 6a8a28b
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@
import com.facebook.react.common.assets.ReactFontManager;
import com.facebook.react.views.text.ReactTypefaceUtils;

/**
* A {@link MetricAffectingSpan} that allows to change the style of the displayed font.
* CustomStyleSpan will try to load the fontFamily with the right style and weight from the assets.
* The custom fonts will have to be located in the res/assets folder of the application. The
* supported custom fonts extensions are .ttf and .otf. For each font family the bold, italic and
* bold_italic variants are supported. Given a "family" font family the files in the assets/fonts
* folder need to be family.ttf(.otf) family_bold.ttf(.otf) family_italic.ttf(.otf) and
* family_bold_italic.ttf(.otf). If the right font is not found in the assets folder CustomStyleSpan
* will fallback on the most appropriate default typeface depending on the style. Fonts are
* retrieved and cached using the {@link ReactFontManager}
*/
@Nullsafe(Nullsafe.Mode.LOCAL)
public class CustomStyleSpan extends MetricAffectingSpan implements ReactSpan {

/**
* A {@link MetricAffectingSpan} that allows to change the style of the displayed font.
* CustomStyleSpan will try to load the fontFamily with the right style and weight from the
* assets. The custom fonts will have to be located in the res/assets folder of the application.
* The supported custom fonts extensions are .ttf and .otf. For each font family the bold, italic
* and bold_italic variants are supported. Given a "family" font family the files in the
* assets/fonts folder need to be family.ttf(.otf) family_bold.ttf(.otf) family_italic.ttf(.otf)
* and family_bold_italic.ttf(.otf). If the right font is not found in the assets folder
* CustomStyleSpan will fallback on the most appropriate default typeface depending on the style.
* Fonts are retrieved and cached using the {@link ReactFontManager}
*/
private final AssetManager mAssetManager;

private final int mStyle;
Expand Down

0 comments on commit 6a8a28b

Please sign in to comment.