tabler-icons icon indicating copy to clipboard operation
tabler-icons copied to clipboard

Icon font is misaligned in Flutter

Open adiospace opened this issue 5 years ago • 6 comments

Hi,

first of all, thank you for this awesome font!

I'm using it in a Flutter app, as an icon font, and it seems it's a bit misaligned. Here's a snapshot next to Material Icons font to see the difference.

CleanShot 2021-03-11 at 19 06 39@2x

Any ideas why?

adiospace avatar Mar 11 '21 17:03 adiospace

I went on Sketch, open 2 icons, select the paths and convert them into outlines and now I get this...

wel04vwaAr2TP8VWnUCi96UiRd6CK3b9Kev5Afe7

which is an improvement, but still a bit misaligned.

adiospace avatar Mar 11 '21 17:03 adiospace

It depends on what size your intending to use the icons at. I have the opposite problem. I tend to make the font smaller, and have to futz around with padding to get them to align correctly. There’s not going to be a one size fits all solution here. Just adjust the padding/margin/size to suit your needs.

zaddok avatar Mar 12 '21 00:03 zaddok

That said, there are a few that genuinely do not align perfectly, but I assume your referring to overall general alignment not specific icons.

zaddok avatar Mar 12 '21 00:03 zaddok

@zaddok @adiospace can this be related to #14 ?

FreexD avatar Apr 10 '21 14:04 FreexD

This is not specific to flutter, it's a problem even on the web when using the icon fonts

ranfdev avatar Jun 10 '22 20:06 ranfdev

The issue is also clearly visible in the included example webpage: https://github.com/tabler/tabler-icons/blob/master/iconfont/tabler-icons.html

Screenshot from 2022-06-11 13-45-34.

I've solved this issue by adding a css transform:

i.ti {
  /* 
  compensates the wrong top spacing in the iconfont.  
  See https://github.com/tabler/tabler-icons/issues/118/ 
  */
  transform: translateY(-1px); 
}

ranfdev avatar Jun 11 '22 11:06 ranfdev

it's fixed already! :)

codecalm avatar Mar 11 '23 12:03 codecalm

Hi @codecalm . Can you provide more information on how and where it is fixed? Because I'm still facing this issue even with the latest version. Thank you.

reza00farjam avatar May 16 '23 09:05 reza00farjam