Comments (13)
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.
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.
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.
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.
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:
And here's the modified 1.15 version:
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.
Will take a look this weekend. Will let you know.
from font-line.
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.
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.
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.
No worries! Let me know if it worked out in the modified fonts.
from font-line.
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.
from font-line.
great to hear that! enjoy it
from font-line.
Will close this. Feel free to reopen if you have any other problems with it.
from font-line.
Related Issues (20)
- Fix version string reporting in report command HOT 1
- In `modify_linegap_percent()`, shouldn't all the `int()` functions be `round()` instead?
- Add support for Markdown formatted metrics list
- Add support for JSON formatted metrics standard output
- Fix License link in ToC
- Better error handling? Crashes when an attribute is not present HOT 12
- Add test font for missing attribute issue
- pip install fails due to permission error HOT 2
- shebang issue HOT 4
- Eliminate Python 2.7 support
- font-line will be upgrading to Py3.6+ support only! HOT 1
- Option to modify ┬ │ ┼ ┴ ├ ┤┘└┌ ┐ glyph heights HOT 7
- Font weight changed after changing the interline spacing HOT 16
- Dependabot couldn't authenticate with https://pypi.python.org/simple/ HOT 1
- Add metrics warning to report tool for values that values fall within yMin / yMax HOT 1
- Allow negative percents HOT 10
- Report data modification and writing back to fontfile! HOT 6
- Add an option to change font family name and/or id HOT 17
- Capital height and X height in Metrics Report. Feasible? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from font-line.