Skip to content

Android android_hyphenationFrequency in text does not work in react-native 0.64.2 #31878

@evd1ser

Description

@evd1ser

Description

I'm trying to add soft hyphenation to app using android_hyphenationFrequency but it doesn't work.

try on new clean app

React Native version:

{
  "name": "TestTestWrapp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "react": "17.0.1",
    "react-native": "0.64.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "7.14.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.64.0",
    "react-test-renderer": "17.0.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

Steps To Reproduce

  1. create new app
  2. add some text like WillHaveAnHyphenWhenBreakingForNewLine
    2.1 for example I use three text with different symbol
    2.2 WillHave\u00ADAnHyphen\u00ADWhen\u00ADBreaking\u00ADForNew\u00ADLine - in this issue written that it doesn't work for android
    2.3 WillHave\u200BAnHyphen\u200BWhen\u200BBreaking\u200BForNew\u200BLine - wrap for android
  3. add maxWidth to container - example 300
  4. add text props android_hyphenationFrequency with any value
  5. run on android device example: emulator Pixel 4 API 30

Expected Results

To see the result like in this request - #29157

but I don't see anything like it

Snack, code example, screenshot, or link to a repository:

code example:
Снимок экрана 2021-07-19 в 13 20 26
result example:
Screenshot_1626690040

text wrap with \u200B but no hyphenation symbol

repository with example - https://github.com/evd1ser/test-rn-andoid-text-hyphenation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: TextPlatform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions