Sublime Forum

Issue on changing font in Sublime Text 3.2.2 (Windows)

#1

I am trying to write a bilingual (Bangla+English) document in LaTeX. The issue is discussed in TeX SE post.
But due to the default font of Sublime Text 3 editor, it shows the Bangla texts broken. In Miktex Texworks or in TeXmaker, I can fix this issue by changing the font to SolaimanLipi.
So, here, I wanted to do the same.
To change the font, I have followed the steps given here.
At the right-hand pane in Preferences > Settings - Syntax Specific, I have put:

"font_face": "SolaimanLipi",
"font_size": 10

But still, the Bangla texts are showing broken.
How can I fix this problem?

0 Likes

#2

A few things you can try to diagnose the issue.

  1. Is that font SolaimanLipi installed in your system ? (Maybe double check the spelling also)
  2. What does view.settings.get("font_face") return ? (Copy that to console input and press enter when the current file is a .tex file)

As per https://www.sublimetext.com/docs/3/settings.html, font_face is an editor setting (which can thus be used in syntax specific settings so I would expect it to work)

0 Likes

#3
  1. Yes, the font SolaimanLipi is installed in my Windows 10.
  2. Putting view.settings.get("font_face") in console returns:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'function' object has no attribute 'get'
0 Likes

#4

Whoops, my bad. It should be view.settings().get("font_face")

0 Likes

#5

Yes, It returns the font name.

>>> view.settings().get("font_face")
'SolaimanLipi'

I just noticed the font actually has changed to SolaimanLipi. But it’s not perfectly handling the complex Bangla texts.
Here, I am putting a screenshot of the same source code Sublime Text and Texmaker editor side by side. Check the yellow marking at line 45 to understand the difference.

0 Likes

#6

If that language is a RTL language, that is not currently supported in Sublime.

0 Likes

#7

No, Bangla is not a RTL language.

0 Likes

#8

If the font relies on ligatures to render certain glyphs those are not supported in Sublime Text - only symbol ligatures are supported.

0 Likes

#9

I see. Maybe that’s the reason.
TeXworks or Texmaker doesn’t have this issue. But now-a-days I prefer using Sublime Text.
I hope it will be fixed/updated in Sublime Text soon.

0 Likes