GNU bug report logs - #64618
29.0.92; Can't set Fira code font with italic type on Windows system

Previous Next

Package: emacs;

Reported by: Eason Huang <aqua0210 <at> foxmail.com>

Date: Fri, 14 Jul 2023 15:37:03 UTC

Severity: normal

Found in version 29.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eason Huang <aqua0210 <at> foxmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64618 <at> debbugs.gnu.org
Subject: bug#64618: 29.0.92; Can't set Fira code font with italic type on Windows system
Date: Sat, 15 Jul 2023 07:54:27 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eason Huang <aqua0210 <at> foxmail.com>
>> Date: Fri, 14 Jul 2023 23:36:00 +0800
>>
>> Currently I tried to use Fira Code font on Windows 10, but the italic
>> font can not use on Emacs 29 and Emacs 30, it rolls back to regular
>> font. This only happends on Windows platform. It works as expected on
>> macOS.
>>
>> Does anyone known how to make it works?
>>
>> You can downlaod and install Fira Code from this link:
>>
>> https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip
>>
>> steps to reproduce:
>>
>> 1. Unzip the Fira_Code_v6.2.zip and install Fira Code fonts in ttf
>> folder
>>
>> 2. Start Emacs with `emacs -Q`
>> 3. From the Menu, choose Options -> Set Default Font...
>> 4. From the popup window, select Fira Code font with italic type
>> Now you will see that the font of current buffer have been changed to
>> Fira Code with Regular font type. It should be the italic font type.
>
> The zip file whose URL you posted doesn't seem to include an italic
> variant of Fir Code...

Yes, you are right. Fira code do not provide an italic variant.


But with other applications such as MS Word and Notepad3, Fira Code can
show italic style.


Meawhile, Emacs 29 on macOS can Show italic with the same Fira Code
font.

I tried below font setting on both Windows and macOS:

```
(add-to-list 'default-frame-alist (cons 'font "Fira Code-13"))
```

After Emacs start up, put your cursor on an character and execute
`M-x describe-char`, and shows result as
below:

```
macOS:

             position: 4 of 43 (7%), column: 3
            character: H (displayed as H) (codepoint 72, #o110, #x48)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x48
               script: latin
               syntax: w 	which means: word
             category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 48" or "C-x 8 RET LATIN CAPITAL LETTER H"
          buffer code: #x48
            file code: #x48 (encoded by coding system utf-8)
              display: by this font (glyph code):
    mac-ct:-*-Fira Code-regular-italic-normal-*-13-*-*-*-m-0-iso10646-1 (#x28)

Character code properties: customize what to show
  name: LATIN CAPITAL LETTER H
  general-category: Lu (Letter, Uppercase)
  decomposition: (72) ('H')

There are text properties here:
  face                 font-lock-comment-face
  fontified            nil
  ws-butler-chg        chg

Windows:

             position: 4 of 39 (8%), column: 3
            character: H (displayed as H) (codepoint 72, #o110, #x48)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x48
               script: latin
               syntax: w 	which means: word
             category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 48" or "C-x 8 RET LATIN CAPITAL LETTER H"
          buffer code: #x48
            file code: #x48 (encoded by coding system utf-8)
              display: by this font (glyph code):
    harfbuzz:-outline-Fira Code-regular-normal-normal-*-18-*-*-*-c-*-iso8859-1 (#x28)

Character code properties: customize what to show
  name: LATIN CAPITAL LETTER H
  general-category: Lu (Letter, Uppercase)
  decomposition: (72) ('H')

There are text properties here:
  face                 font-lock-comment-face
  fontified            nil
  ws-butler-chg        chg
```

And you can see that there do have the italic font
`-*-Fira Code-regular-italic-normal-*-13-*-*-*-m-0-iso10646-1` on macOS Emacs,
but don't have on Windows.

Is it possible to make the Emacs on Windows have the same ability as the
Emacs on macOS for showing this kind of font without italic variant?


-- 
Eason Huang





This bug report was last modified 1 year and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.