Giter VIP home page Giter VIP logo

Comments (13)

chrissimpkins avatar chrissimpkins commented on June 24, 2024

@alphapapa

Will modify the calculations to address this issue. We had a discussion about the line spacing approaches in #2 and the Fira approach is one that was discussed (and recommended) there. I will be able to support modifications in fonts that use these metrics. Should be a reasonably simple fix. Will let you know when it is available in this thread.

from font-line.

alphapapa avatar alphapapa commented on June 24, 2024

Ah, yes, I saw that thread. I didn't realize how complicated and non-cross-platform line-spacing metrics are. Web fonts don't help the situation, do they? haha

Thanks for your work on this. I was particularly inspired when you said:

I understand that this is, perhaps, unacceptable from a design purist standpoint but I would like to try to develop a strategy that empowers users to make the typeface more usable/functional for themselves in situations where editors do not permit line spacing adjustments.

It's refreshing to hear a knowledgeable and capable developer express such a user-focused point of view today. It seems to be more and more rare, with most software being inclined to capture users rather than empower them.

Let me know if you ever decide to start a Web browser project... (half kidding...)

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

how complicated and non-cross-platform line-spacing metrics are

Yes! Frustratingly so...

user-focused point of view...

I make tools that I want/need and use everything that I make so I am very user-focused :)

if you ever decide to start a Web browser project...

lol 😊🔫

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

Your issue is fixed as of v0.6.0. It is now live on PyPI and in the master branch of the repository.

You can upgrade with:

$ pip install --upgrade font-line

I tested the changes on FiraMono which has the same metrics as FiraCode. You should be able to increase and decrease line spacing by the %UPM value defined on the command line now.

Let me know if you still see any problems after the update.

Enjoy!

from font-line.

alphapapa avatar alphapapa commented on June 24, 2024

Hi Chris,

I tested the new version and the metric adjustments work fine. It's nice to have those few extra lines!

However, I noticed that the glyphs look a bit different in the modified font. They don't look bad, but they appear thinner. Is this expected? I've attached screenshots. Here's the original:

fira-code-original

And here's the modified 1.15 version:

fira-code-15

I also noticed that the line-spacing appears inconsistent. For example, in the let*, where the vars positive-re, positive-re-list, and context-re are defined, the middle line is closer to the line below it than the line above it by 1-2 pixels.

Is this something like a rounding error or a lack of precision? Would using different metrics adjust more cleanly?

Thanks for your work on this.

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

Will take a look this weekend. Will let you know.

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

I am having a difficult time making out the issues that you describe in the screenshots. Unclear to me why you would be seeing thinner strokes in the glyphs with these changes. As for the line spacing issue, I wonder if emacs accounts for spacing between lines based upon the size of glyphs in a given line. This might be a way to prevent clipping of parts of the glyphs that span across your tighter line spacing. Does this seem to be happening only in cases where there are glyphs present that extend below the baseline? Have a look for lines that include the lowercase g since it will tend to be one that spans the lowest in the ASCII set.

Are you seeing these issues in other editors?

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

Actually, just noticed that this does not seem to be the same typeface in the two images! Check the lowercase g glyph. They are different in the two sets.

from font-line.

alphapapa avatar alphapapa commented on June 24, 2024

Wow, that's a facepalm-fail on my part. Apparently, after installing the new font and restarting Emacs, I forgot to actually select the new font in Emacs. And then I didn't look closely enough at the screenshots I took to notice. Sorry for wasting your time on this. :(

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

No worries! Let me know if it worked out in the modified fonts.

from font-line.

alphapapa avatar alphapapa commented on June 24, 2024

Hey Chris,

I just tested it again and it's looking great! I modified Fira Code from the default 1.2 to 1.15, and I gained 4 extra lines of text in Emacs, and all the glyphs appear to look the same. I've attached screenshots.

Thanks for your work on this! This will make several fonts usable for me, ones where the default line spacing simply is too large.

fira-code-20
fira-code-15

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

great to hear that! enjoy it

from font-line.

chrissimpkins avatar chrissimpkins commented on June 24, 2024

Will close this. Feel free to reopen if you have any other problems with it.

from font-line.

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.