Giter Site home page Giter Site logo

Comments (5)

beaugunderson avatar beaugunderson commented on May 22, 2024

I should also specify that this is on OS X using the Core Text API; I'm on e34f74f.

from kitty.

kovidgoyal avatar kovidgoyal commented on May 22, 2024

Hmm, I dont have an awful lot of experience with CoreText but I know of no reason why it should prefer the oblique to the regular face, see line 48 of core_text.m where the font descriptor is created, the only traits specified are bold, italic and monospace, bold and italic should give the bold and italic variants and when they are off it should give the normal variant. And in https://developer.apple.com/reference/coretext/ctfontsymbolictraits?language=objc I see no mention of oblique at all. So I'm not sure what else to do here. You can display the full name of the font CoreText resolves to, using the following command:

/Users/Shared/buildbot/sw/sw/bin/python3 /path/to/kitty -c "from kitty.fonts.core_text import *; set_font_family('DejaVuSansMonoForPowerline', 12, True); f=main_font[(False, False)]; print(f.family_name, f.full_name)"

from kitty.

kovidgoyal avatar kovidgoyal commented on May 22, 2024

no followup

from kitty.

beaugunderson avatar beaugunderson commented on May 22, 2024

sorry for the slow response @kovidgoyal!

here's what you asked for (I updated to current git and rebuilt before running this):

$ /Users/Shared/buildbot/sw/sw/bin/python3 . -c "from kitty.fonts.core_text import *; set_font_family('DejaVuSansMonoForPowerline Nerd Font', 12, True); f=main_font[(False, False)]; print(f.family_name, f.full_name)"
[glfw error]: The GLFW library is not initialized
DejaVuSansMonoForPowerline Nerd Font
DejaVu Sans Mono Oblique for Powerline Nerd Font Complete Mono

$ /Users/Shared/buildbot/sw/sw/bin/python3 . -c "from kitty.fonts.core_text import *; set_font_family('DejaVuSansMonoForPowerline Nerd Font Book', 12, True); f=main_font[(False, False)]; print(f.family_name, f.full_name)"
[glfw error]: The GLFW library is not initialized
Helvetica
Helvetica

$ /Users/Shared/buildbot/sw/sw/bin/python3 . -c "from kitty.fonts.core_text import *; set_font_family('DejaVuSansMonoForPowerlineNerdFontCompleteMono-Book', 12, True); f=main_font[(False, False)]; print(f.family_name, f.full_name)"
[glfw error]: The GLFW library is not initialized
Helvetica
Helvetica

Notice that a family name of DejaVuSansMonoForPowerline Nerd Font returns the Oblique face (not the Book one).

from kitty.

kovidgoyal avatar kovidgoyal commented on May 22, 2024

Probably, the font name you need is something like

DejaVu Sans Mono Book for Powerline Nerd Font Complete Mono
or
DejaVu Sans Mono Regular for Powerline Nerd Font Complete Mono
or
DejaVu Sans Mono for Powerline Nerd Font Complete Mono

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.