Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public void updateMeasureState(TextPaint paint) {
apply(paint);
}

public float getSpacing() {
return mLetterSpacing;
}

private void apply(TextPaint paint) {
if (!Float.isNaN(mLetterSpacing)) {
paint.setLetterSpacing(mLetterSpacing);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public int getWeight() {
return mFontFamily;
}

public @Nullable String getFontFeatureSettings() {
return mFeatureSettings;
}

private static void apply(
Paint paint,
int style,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public class ReactTextUpdate {
private final int mSelectionEnd;
private final int mJustificationMode;

public boolean mContainsMultipleFragments;

/**
* @deprecated Use a non-deprecated constructor for ReactTextUpdate instead. This one remains
* because it's being used by a unit test that isn't currently open source.
Expand Down Expand Up @@ -142,13 +140,11 @@ public static ReactTextUpdate buildReactTextUpdateFromState(
int jsEventCounter,
int textAlign,
int textBreakStrategy,
int justificationMode,
boolean containsMultipleFragments) {
int justificationMode) {

ReactTextUpdate reactTextUpdate =
new ReactTextUpdate(
text, jsEventCounter, false, textAlign, textBreakStrategy, justificationMode);
reactTextUpdate.mContainsMultipleFragments = containsMultipleFragments;
return reactTextUpdate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ public static boolean isRTL(MapBuffer attributedString) {

MapBuffer fragment = fragments.getMapBuffer((short) 0);
MapBuffer textAttributes = fragment.getMapBuffer(FR_KEY_TEXT_ATTRIBUTES);

if (!textAttributes.contains(TextAttributeProps.TA_KEY_LAYOUT_DIRECTION)) {
return false;
}

return TextAttributeProps.getLayoutDirection(
textAttributes.getString(TextAttributeProps.TA_KEY_LAYOUT_DIRECTION))
== LayoutDirection.RTL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ rn_android_library(
"pfh:ReactNative_CommonInfrastructurePlaceholder",
"supermodule:xplat/default/public.react_native.infra",
],
language = "JAVA",
language = "KOTLIN",
pure_kotlin = False,
required_for_source_only_abi = True,
visibility = [
"PUBLIC",
Expand All @@ -29,7 +30,9 @@ rn_android_library(
react_native_target("java/com/facebook/react/views/imagehelper:imagehelper"),
react_native_target("java/com/facebook/react/views/scroll:scroll"),
react_native_target("java/com/facebook/react/views/text:text"),
react_native_target("java/com/facebook/react/common/mapbuffer:mapbuffer"),
react_native_target("java/com/facebook/react/views/view:view"),
react_native_target("java/com/facebook/react/config:config"),
],
exported_deps = [
react_native_dep("third-party/android/androidx:appcompat"),
Expand Down
Loading