oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.4k stars 2.12k forks source link

Sides of the icons get cut in custom font #540

Open pjamrozowicz opened 7 years ago

pjamrozowicz commented 7 years ago

I have a problem using Weather Font from here: https://erikflowers.github.io/weather-icons/ as a custom font. Right side (and sometimes left too) of the icons gets cut.

1 2

(json & ttf files) font.zip

Do you have any idea why it's happening?

My code (simplified): WeatherIcon.js

import { createIconSet } from 'react-native-vector-icons';
import glyphMap from '@assets/fonts-config/WeatherIconsGlyphMap.json';

const iconSet = createIconSet(glyphMap, 'weather-font', 'weather-font.ttf');
export default iconSet;

Temperature.js

export default class Temperature extends Component {
  render() {
      return (
        <View style={styles.temperatureContainer}>
          <WeatherIcon name="wi-thermometer" size={30} color="#0B7DCC"/>
        </View>
      )
    }
}

--------------

temperatureContainer: {
    alignItems: 'center',
    justifyContent: 'center',
    flex: 1,
  },
kidequinox commented 7 years ago

Same issue, for now solving issue using space after it <Text>WELCOME TO MYAPP{' '}</Text>

Tested with ttf font on android.

mtt87 commented 6 years ago

I have a similar issue with custom icons with a circle for example it's cut at the bottom

screen shot 2018-02-27 at 13 49 28

It's more obvious when the size is small

screen shot 2018-02-27 at 13 50 00
mayconmesquita commented 5 years ago

i have the same problem here