kaanginam / expandable-notifications

Makes notifications in notification list expandable
GNU Affero General Public License v3.0
25 stars 2 forks source link

Parts of content are truncated when CJK characters are included #12

Open ghost opened 1 year ago

ghost commented 1 year ago

Tested on Gnome 44.

I found that the contents were cut off when CJK (Chinese, Japanese, Korean) characters were included. image command explanation
image notify-send -i dialog-warning "[テスト]緊急地震速報(気象庁)" "14時46分宮城県仙台市東70km南西12km海域でマグニチュード7.2地震発生\n発表:14時47分\nダミー データ\nダミーデータ" The 発表:14時47分\nダミー データ\nダミーデータ after \n is gone.
image notify-send -i dialog-warning "[テスト]緊急地震速報(気象庁)" "14時46分宮城県仙台市東70km南西12km海域でM7.2地震発生\n発表:14時47分" The content after the 25th character has been replaced with ....

GNOME's built-in notification extension (hover expands notifications) displays the full content normally. image

I used google translator. If there are any sentences you don't understand, please let me know!

ghost commented 1 year ago

I did some tests. To summarize the cause, it incorrectly calculates the expanded message height when it contains CJK characters(By modifying the code and making the height large enough, the invisible text appeared) I'm assuming it's miscalculating the height from Gtk or Gnome, not the extension, but I'm not sure about this.

kaanginam commented 8 months ago

Sorry for the late response! Is this still an issue?

I believe that it's gnome calculating the lines incorrectly - but I'll try to find a way to get it right.