Comments (9)
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.
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.
I think this is a bug with the way the font is constructed. The glyphs are set below the baseline.
from simple-icons-latex.
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.
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.
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.
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.
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
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 simple-icons-latex.