Rocket.chat.reactnative: Font size strange big in Japanese.

Created on 22 Oct 2020  ·  7Comments  ·  Source: RocketChat/Rocket.Chat.ReactNative

Description:

Environment Information:

  • Rocket.Chat Server Version: 3.7.1
  • Rocket.Chat App Version: 4.11.0.20775
  • Device Name: Pixel 3a XL
  • OS Version: Android 11

Steps to reproduce:

  1. Send less than 4 characters (CJK character. I'm Japanese so input Japanese character)

Expected behavior:


Show the normal font size.

Actual behavior:


The font size is strange big.
rc_native_font_bug

Additional context:


Maybe this bug is affected by CJK characters only.

🐛 bug

Most helpful comment

@falconws fix is on the way.
We just need to wait until RN64 is released, but that's probably happening on the next weeks.
I'll make sure it gets picked for 4.13.

All 7 comments

React Native: Maybe related to this.
https://github.com/facebook/react-native/issues/29363

We have a markdown regex to identify messages containing 4 chars containing only emojis and make them slightly bigger.
Maybe the regex is taking these characters.

https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/app/containers/markdown/index.js#L43

@diegolmello Thank you for your response.
fm... To fix this bug, exclude these Unicode range from '\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]' ?
(https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/app/containers/markdown/index.js#L34)

Hiragana (ひらがな): https://ja.wikipedia.org/wiki/%E5%B9%B3%E4%BB%AE%E5%90%8D_(Unicode%E3%81%AE%E3%83%96%E3%83%AD%E3%83%83%E3%82%AF)

Katakana (カタカナ): https://ja.wikipedia.org/wiki/%E7%89%87%E4%BB%AE%E5%90%8D_(Unicode%E3%81%AE%E3%83%96%E3%83%AD%E3%83%83%E3%82%AF)

~Can you open a PR?~

Actually, I have a better idea and I'll do it myself.

@falconws fix is on the way.
We just need to wait until RN64 is released, but that's probably happening on the next weeks.
I'll make sure it gets picked for 4.13.

@diegolmello When is this fix release to Google Play Store?
You said next week, but now 20 days pass...

@falconws The fix is working, but React Native 0.64.0 is not released yet.
This fix uses a feature that is unavailable on the current version of Hermes (which is attached to RN64).
The community just released 0.64.0-rc.1, so maybe there's still some time to make it, but I can't promise.
If you can't wait, you can follow our docs and build a whitelabel for your users and cherry pick the fix https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/2610

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mar-v picture mar-v  ·  3Comments

monarkh-karina picture monarkh-karina  ·  4Comments

Perflyst picture Perflyst  ·  5Comments

venkatasubramanis picture venkatasubramanis  ·  5Comments

HamzaKhait picture HamzaKhait  ·  4Comments