bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64618: 29.0.92; Can't set Fira code font with italic type on Windows


From: Eason Huang
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
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Eason Huang <aqua0210@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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]