3
$\begingroup$

Bug introduced in 12.3.1 or earlier, persisting through 13.3.1.


a = {"one", "b", "你好%"}; b = RandomInteger[1, {3, 40}]; c = AssociationThread[a, b]; Dendrogram[c] 

produces this

enter image description here

That is all right. If there is "XITS" font in the string, the result is not right.

a1 = StringReplace[a, "%" -> ToString[ Style["%", FontFamily -> "XITS", PrivateFontOptions -> {"OperatorSubstitution" -> False}], StandardForm]]; c1 = AssociationThread[a1, b]; Dendrogram[c1] 

produces

enter image description here

The "XITS" font can be replaced by other font to reproduce the issue. How to repair it?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

You should have put more effort in creating a minimal sample. The issue isn't related to Chinese, nor is it related to XITS font. The following is a minimal sample reproducing the issue:

plot := Dendrogram[{ToString[ Style["%", FontFamily -> "Times New Roman", PrivateFontOptions -> {"OperatorSubstitution" -> False}], StandardForm], 1}] plot 

enter image description here

What has happened? It seems that the function Short has been mistakenly used internally:

plot // InputForm 

enter image description here

So it's reasonable to guess, disable Short may fix the issue, and it's indeed the case:

Block[{Short = Identity}, plot] 

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks. I have modified the question. $\endgroup$ Commented Sep 24, 2023 at 2:22

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.