Git Product home page Git Product logo

Comments (9)

eburghar avatar eburghar commented on September 28, 2024 1

I confirm the bug. I use this as a temporary fix.

\newcommand{\simpleIcon}[1]{%
  \raisebox{1.2\fontcharht\font`0}{%
    \simpleicon{#1}%
  }%
}

from simple-icons-latex.

ineshbose avatar ineshbose commented on September 28, 2024

Thank you for confirming the bug and using this package - it means a lot.

I'm still investigating for solutions, but I have kept a note for this approach! 😄

from simple-icons-latex.

eburghar avatar eburghar commented on September 28, 2024

I think this is a bug with the way the font is constructed. The glyphs are set below the baseline.

from simple-icons-latex.

eburghar avatar eburghar commented on September 28, 2024

With the aforementioned fix in the font which should be merged soon, the best way to vertical align the icon with the current font is to is to lower the icon by half of the current font depth (taking y as a reference).

\newcommand{\simpleIcon}[1]{%
	\raisebox{-0.5\fontchardp\font`y}{%
		\simpleicon{#1}%
	}%
}

from simple-icons-latex.

ineshbose avatar ineshbose commented on September 28, 2024

Tracking PR: simple-icons/simple-icons-font#171

Thank you a lot for this. I'm waiting for this to merge, and then from this end I'm intending to fix this from the opentype.js font construction way (https://github.com/ineshbose/simple-icons-latex/blob/master/bindings.js#L31), but at the moment I'm not finding the right methods to do it. With that said, I really appreciate your efforts, and if you would consider making a PR (with the JS approach if feasible else redefining the command) so that your contribution is noted.

from simple-icons-latex.

eburghar avatar eburghar commented on September 28, 2024

Hi,

I don't think you need to do anything on your side. It looks ok without the raisebox. I think this should be done on the font itself glyphs by glyphs as some can look misaligned when lied on the descent line and other if lied on the baseline.

If you don't want to wait for the merge, as the font is included in the CTAN package, you can just build the font with the merge applied, copy the otf locally, and loadSync("SimpleIcons.otf") in the binding.js. That's what I did.

from simple-icons-latex.

ineshbose avatar ineshbose commented on September 28, 2024

Thanks for the suggestion! That is definitely one fix along with using the raisebox which one can use temperarily but for the package and developer convenience, it is best that everything is handled by itself without requiring additional configuration or work. I see that the issue has been closed in simple-icons-font, and so I am just waiting for the pipeline to also automatically update to that version so that this can be confirmed to be fixed for this package as well and closed off!

from simple-icons-latex.

ineshbose avatar ineshbose commented on September 28, 2024

Sorry for taking a while! Package has finally been updated and this is now confirmed to be fix. Thank you very much for your contribution and patience. Closing!

from simple-icons-latex.

Related Issues (9)

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.