Skip to content

Commit e0bfebb

Browse files
authored
Merge pull request #547 from opentensor/fix/thewhaleking/patches-broken-brahmi-text
Patches broken Brahmi characters with normal characters.
2 parents 2ed340d + f51e513 commit e0bfebb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bittensor_cli/src/commands/subnets/subnets.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,17 @@ def _create_table(subnets_, block_number_):
323323

324324
for subnet in subnets_:
325325
netuid = subnet.netuid
326+
# The default symbols for 123 and 124 are visually identical:
327+
# 123: 𑀀
328+
# 124: 𑀁
329+
# and the symbol for 125 is basically a colon
330+
# 125: 𑀂
331+
# however, because they're in Brahmi, which very few fonts support, they don't render properly
332+
# This patches them.
333+
replacements = {69632: "˙", 69633: "˙", 69634: ":"}
334+
if (sso := ord(subnet.symbol)) in replacements.keys():
335+
subnet.symbol = replacements[sso]
336+
326337
symbol = f"{subnet.symbol}\u200e"
327338

328339
if netuid == 0:

0 commit comments

Comments
 (0)