Coder Social home page Coder Social logo

Comments (6)

endtwist avatar endtwist commented on August 14, 2024

Have you tried changing the line-height? This may have something to do with the current font-size and line-height of the icon's parent element.

from fontcustom.

timhettler avatar timhettler commented on August 14, 2024

Not a line-height thing. After comparing the font I generated to the one on the fontcustom homepage (and a system font to use as a baseline):

Screen Shot 2012-12-18 at 10 30 29 AM

...It seems pretty clear that it's an issue with either my SVG files, or the compiler. Any chance you could share the file you used to create your fonts? That way I could compile it locally to try and pinpoint where the issue is.

from fontcustom.

matthewferry avatar matthewferry commented on August 14, 2024

I think this may have something to do with the ascent and descent of the generated glyphs. We actually had some issues with this as well since we were transitioning to use fontcustom from icomoon, where the ascent and descent are modified based on an svg size of 512 and base font size of 16. Fontcustom's generated svg is set at 1000 and the ascent and descent are default. This means whitespace is 0 on the horizontal of the glyph and the glyph will reside on the baseline, NOT at the descender of the font.

The font-forge API has options you can pass, namely fontforge.font().ascent and fontforge.font().descent. Would be nice to include some options to set custom ascender/descender? ...because we had to modify generate.py which is less than ideal ;)

from fontcustom.

kaizau avatar kaizau commented on August 14, 2024

Ascent and descent have been tweaked in 1.0.0.pre — made a bit difference in my tests. @matthewferry I'll add a new issue for your options suggestion.

from fontcustom.

matthewferry avatar matthewferry commented on August 14, 2024

Nice! Thanks @EZYZ

from fontcustom.

chrisheuberger avatar chrisheuberger commented on August 14, 2024

Has this issue been resolved? I'm trying to set all icons to a consistent baseline no matter their width and can't figure out what to set the font_ascent and font_descent in fontcustom.yml. Thanks.
screen shot 2015-07-09 at 7 19 03 pm

from fontcustom.

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.