Sublime Forum

Italic/bold not working

#30

This behavior is intended, and not a bug.

0 Likes

#31

Fine, works for me. I will tell that to my users.

0 Likes

#32

I’m using Input Serif Compressed and was trying to get it to reflect various weights. I discovered that you have to go to the actual font name as it is stored on your machine. So in my case, to get the bold variant, I had to show it like so:

"font_face": "InputSerifCompressed-Bold",

That worked for me on my Mac.

0 Likes

#33

I was struggling to get Ubuntu Mono font to work. On my Mac, the font book has a collection that I installed called Ubuntu Mono but when I enabled that font in the file: Preferences.sublime-settings–User like this: “font_face”: “Ubuntu Mono”, all text characters turned in to squares with a question mark in the center.

*Resolution: from font book, select the font collection you want to use. In my case, Ubuntu Mono. Then right click on that collection and “show in finder”. Each font was listed individually in the Fonts folder: UbuntuMono-B.ttf, UbuntuMono-BI.ttf, UbuntuMono-R.ttf, UbuntuMono-RI.ttf. So I created a new folder in the Fonts folder named “Ubuntu Mono” and moved the UbuntuMono fonts to the new folder. When I enabled “font_face”: "Ubuntu Mono: and saved the Preferences file it worked!

I hope this is helpful to others,

0 Likes

#34

@felixhao28 non-monospaced fonts (e.g. Garamond, Verdana) still face the same issue.

@wbond This behavior is intended, and not a bug.

@wbond so are you saying that there’s no bold/italic support at all for all non-monospaced fonts?

I’ve configured Sublime as a clone (a far better clone!) of iA Writer, and I’m loving it for markdown editing. However, when I set "font_face": "iA Writer Duospace" it no longer has support for bold/italic text - it’s a shame, because this font is basically monospace except for a very few characters.

Here’s the font, it’s open source: https://github.com/iaolo/iA-Fonts

It would be really awesome if Sublime could support bold/italic text on this font :smiley:


Here’s an explanation of the font as well for anyone who’s interested: https://ia.net/topics/in-search-of-the-perfect-writing-font/

0 Likes

#35

Disregard that earlier question asking for clarification, apparently I’m not the first to request this feature:

I was just hoping that maybe a practically monospace font could be supported :sweat_smile: since iA Writer Duospace is completely monospaced (iirc widths don’t change depending on italic/bold styles), except for a few letters which are wider than others (those still stay the same width when bolded/italicised, however). I wouldn’t opposed to an option to override this behaviour and enable non-monospaced fonts to be bolded/italicised anyway - even if it changed the location of the cursor.

0 Likes

#36

How to get rid of Italic font in Sublime Text?

0 Likes

#37

You can use the font_options setting for that:

    // Valid options on all platforms are:
    //  - "no_bold": Disables bold text
    //  - "no_italic": Disables italic text
    // Antialiasing options:
    //  - "no_antialias": Disables antialiasing
    //  - "gray_antialias": Uses grayscale antialiasing instead of subpixel
    // Ligature options:
    //  - "no_liga": Disables standard ligatures (OpenType liga feature)
    //  - "no_clig": Disables contextual ligatures (OpenType clig feature)
    //  - "no_calt": Disables contextual alternatives (OpenType calt feature)
    //  - "dlig": Enables discretionary ligatures (OpenType dlig feature)
    //  - "ss01": Enables OpenType stylistic set 1. Can enable sets 1 to 10
    //        by changing the last two digits.
    // Windows-only options:
    //  - "directwrite": (default) Use DirectWrite for font rendering
    //  - "gdi": Use GDI for font rendering
    //  - "dwrite_cleartype_classic": Only applicable to "directwrite" mode,
    //        should render fonts similar to traditional GDI
    //  - "dwrite_cleartype_natural": Only applicable to "directwrite" mode,
    //        should render fonts similar to ClearType "natural quality" GDI
    //  - "subpixel_antialias": Force ClearType antialiasing when disabled
    //        at system level
    // Mac-only options:
    //  - "no_round": Don't round glyph widths for monospace fonts when
    //        "font_size" is small.
    "font_options": [],

i.e.

    "font_options": ["no_italic"],
0 Likes

#38

Sorry, but I don’t think that your suggestion will work.
In the settings file (ST 3) it says that no_bold and no_italic are not supported.
Perhaps you are referring to ST4?

0 Likes

#39

The paste above is from Default/Default (Windows).sublime-settings as shipped with ST3 build 3210 and seems to work just fine. If your settings file is different, perhaps you have an override from a prior version?

1 Like

#40

I am using ST3 build 3210 on Ubuntu 20.04. I thought that the settings file would be identical regardless of platform, but perhaps that is not the case.

.

I don’t know about overrides. I don’t think I have them.

0 Likes

#41

You’re looking at the comment for the setting that follows font_options:

    // Font options for theme text. Valid options are the same as
    // "font_options", except "no_bold" and "no_italic" are not supported
    "theme_font_options": [],
0 Likes

#42

Sorry, my mistake. It’s sometimes difficult to understand these settings files.

0 Likes

#43

No worries. At least we got it sorted out. :slight_smile:

1 Like

#44

Your theme and color scheme looks very good, which one are you using?

0 Likes

#45

That particular combination is the Adaptive theme and the Monokai color scheme; both ship with Sublime (and Monokai is the default color scheme).

1 Like

#46

I think there are various monokai colors.
if u dont mind can u post how does it looks in JS and HTML while using that theme and color scheme.

0 Likes

#47

There might be, but there’s only one color scheme that ships with Sublime (unless you jump through various hoops to get at the legacy version, which I wouldn’t recommend).

1 Like

#48

Default gives yellow not green color.

0 Likes

#49

The “green” you’re seeing in OdatNurd’s screenshot is due to the syntax highlighting from the PackageDev package. It’s not a color scheme.

1 Like