Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text Cut Off Unicode Android #25155

Closed
dharmen1901 opened this issue Jun 5, 2019 · 2 comments
Closed

Text Cut Off Unicode Android #25155

dharmen1901 opened this issue Jun 5, 2019 · 2 comments
Labels
Bug Platform: Android Android applications.

Comments

@dharmen1901
Copy link

dharmen1901 commented Jun 5, 2019

Text gets cut off when writing in Hindi(Unicode) whereas goes well with English.
The same was working well with version 0.49.2

React Native Version :- 0.59.8

React-Native version
info
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 916.05 MB / 3.78 GB
Binaries:
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5264788

Phone:- Samsung On6 , Samsung M30

render() {
        data=[
            {
                text:"ज. गु. श्री रामान्दाचार्य जी",
                style:{color:"#ff0000",textAlign:"center",fontSize:25}
            },
            {
                text:"Google LLC[5] is an American multinational technology company that specializes in Internet-related services and products, which include online advertising technologies, search engine, cloud computing, software, and hardware. It is considered one of the Big Four technology companies, alongside Amazon, Apple and Facebook.Google LLC[5] is an American multinational technology company that specializes in Internet-related services and products, which include online advertising technologies, search engine, cloud computing, software, and hardware. It is considered one of the Big Four technology companies, alongside Amazon, Apple and Facebook.",
                style:{color:"#0000ff",fontSize:25,margin:10,fontFamily: 'lucida grande',}
            },
            {
                text:"रामान्दाचार्य जी द्वारा बनाये गये लगभग तीस हजार शिष्यों में से निम्नलिखित बारह शिष्य प्रधान माने जाते हैं। इन प्रधान शिष्यों को महाभागवत कहा गया है। सांप्रदायिक मान्यतानुसार इन्हें विविध देवताओं तथा ऋषियों-मुनियों के अवतार माना गया है। श्री अनंतानंदाचार्य जी आपश्री के सर्वप्रथम शिष्य बने फिर श्री पीपा जी, श्री रविदास जी, श्री कबीरदास जी आदि ने आपश्री का शिष्यत्व प्राप्त किया। ये सभी शिष्य परमज्ञानी और सेवानिष्ठ भक्त थे और विद्या, शक्ति तथा मर्यादा का अनुसरण करते हुए श्रद्धापूर्वक सुयोग्य रूप से गुरु सेवा करते रहते थे। इन्हीं महाभागवतों के गुरु भाइयों, शिष्यों-प्रशिष्यों ने आपश्री का संदेश भारत के कोने-कोने तक पहुचाया।",
                style:{color:"#0000ff",fontSize:25,margin:10,fontFamily: 'sans-serif',}
            },
            {
                text:"रामान्दाचार्य जी द्वारा बनाये गये लगभग तीस हजार शिष्यों में से निम्नलिखित बारह शिष्य प्रधान माने जाते हैं। इन प्रधान शिष्यों को महाभागवत कहा गया है। सांप्रदायिक मान्यतानुसार इन्हें विविध देवताओं तथा ऋषियों-मुनियों के अवतार माना गया है। श्री अनंतानंदाचार्य जी आपश्री के सर्वप्रथम शिष्य बने फिर श्री पीपा जी, श्री रविदास जी, श्री कबीरदास जी आदि ने आपश्री का शिष्यत्व प्राप्त किया।",
                style:{color:"#0000ff",fontSize:25,margin:10,fontFamily: 'sans-serif',}
            }
        
        ]
        if (!this.state.loading)
            return (
                <View style={{ backgroundColor: Colors.background, flex: 1 }}>
                    <FlatList
                        data={data}
                        renderItem={({ item }) =>
                            <View style={{ flex: 1 }}>
                                <Text style={item.style}>{item.text}</Text>
                            </View>
                        }
                        keyExtractor={item => item.text}
                    />
                </View>
            );
        else {
            return (
                <Loading />
            )
        }
    }

Text Cut Off

@dharmen1901 dharmen1901 added the Bug label Jun 5, 2019
@react-native-bot react-native-bot added the Platform: Android Android applications. label Jun 5, 2019
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the React Native version: section?

If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.

facebook-github-bot pushed a commit that referenced this issue Jun 27, 2019
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](#25275 (comment)).

- related (maybe)
    - #25297
    - #25275
    - #24837
    - #25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: #25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
kelset pushed a commit that referenced this issue Jun 28, 2019
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](#25275 (comment)).

- related (maybe)
    - #25297
    - #25275
    - #24837
    - #25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: #25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
soh335 added a commit to natureglobal/react-native that referenced this issue Jul 16, 2019
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](facebook#25275 (comment)).

- related (maybe)
    - facebook#25297
    - facebook#25275
    - facebook#24837
    - facebook#25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: facebook#25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
@shruti8597
Copy link

The issue has been resolved in version 0.60

hubertwang pushed a commit to hubertwang/react-native that referenced this issue Nov 1, 2019
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](facebook#25275 (comment)).

- related (maybe)
    - facebook#25297
    - facebook#25275
    - facebook#24837
    - facebook#25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: facebook#25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
hubertwang pushed a commit to hubertwang/react-native that referenced this issue Nov 1, 2019
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](facebook#25275 (comment)).

- related (maybe)
    - facebook#25297
    - facebook#25275
    - facebook#24837
    - facebook#25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: facebook#25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
tomitaku1013 pushed a commit to tomitaku1013/react-native that referenced this issue Dec 6, 2019
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](facebook#25275 (comment)).

- related (maybe)
    - facebook#25297
    - facebook#25275
    - facebook#24837
    - facebook#25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: facebook#25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
M-i-k-e-l pushed a commit to M-i-k-e-l/react-native that referenced this issue Mar 10, 2020
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](facebook#25275 (comment)).

- related (maybe)
    - facebook#25297
    - facebook#25275
    - facebook#24837
    - facebook#25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: facebook#25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
jasonongzx pushed a commit to jasonongzx/react-native that referenced this issue Jun 14, 2021
Summary:
Fix wrapped some languages (like Japanese, Chinese) texts are cut off on android. This p-r is based on linjson [patch](facebook#25275 (comment)).

- related (maybe)
    - facebook#25297
    - facebook#25275
    - facebook#24837
    - facebook#25155

`setUseLineSpacingFromFallbacks` is recommended to set true on [document](https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean))

>For backward compatibility reasons, the default is false, but setting this to true is strongly recommended. It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

## Changelog

[Android] [Fixed] - Fix some languages wrapped texts are cut off.
Pull Request resolved: facebook#25306

Test Plan:
Set the target SDK to 28 in ``fbsource/fbandroid/java/com/facebook/catalyst/shell/AndroidManifest.xml``:
```
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
```

Insert the following code into Playground.js: P67720709

Start the Catalyst Android app and navigate to the playground:

`buck install -r catalyst`

|Before|After|
|{F163482789}|{F163481060}|

Reviewed By: cpojer

Differential Revision: D15985809

Pulled By: makovkastar

fbshipit-source-id: 0f98760b7a7fe4689fa3fe90ca747e9bf9fc4780
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Platform: Android Android applications.
Projects
None yet
Development

No branches or pull requests

3 participants