Giter Site home page Giter Site logo

Comments (10)

jbaek7023 avatar jbaek7023 commented on May 5, 2024 2

Hi,

I hope you have a great holiday!

From FontAwesome Cheetsheet, you can refer to hex value.

For example, in your case, you need "<" sign.

  1. Go to FontAwesome Cheetsheet, link
  2. You would press "Ctrl+F" key and find for "left".
  3. You will find fa-angle-left [&#xf104;] with "<" sign.
  4. xf104 is hex value which is exactly what you were looking for.
  5. convert hex value to the provided link
  6. Decimal Value is 61700! :)
  7. Save it to chevronLeft: toString(61700) to the icon.js
  8. Use it wherever you enclose {FontAwesome.chevronLeft} with <Text/> tag
  9. This solution will apply to every text icons from FontAwesome Cheetsheat

John Baek

from kittentricks.

priyankinfinnov avatar priyankinfinnov commented on May 5, 2024

Did you get and answer to this?
Also when i am using FontIcons.xyz from https://github.com/akveo/kittenTricks/blob/master/app/assets/icons.js file it appears as a box with X in it (PFA screenshot below) can you help ?

screenshot_20171224-153223

from kittentricks.

jbaek7023 avatar jbaek7023 commented on May 5, 2024

Hi there,

Yes, I solved the problem. Using hex to decimal convertor, https://www.binaryhexconverter.com/hex-to-decimal-converter, you can get decimal numbers for FontAwesome font. (I guess Javascript doesn't allow hexadecimal)

But I don't think it's relevant to your problem. I guess you didn't import FontAwesome file(should be .ttf format) correctly in App.js or wherever you pre-load your Fonts such as san-serif, mono....

I will be happy to help you out if you provide me more detail with code.

Best,
John Baek

from kittentricks.

priyankinfinnov avatar priyankinfinnov commented on May 5, 2024

Alas, the code is not open-source. Though i am using this repo as a base, so please can you point me to the file in this repo ?

from kittentricks.

priyankinfinnov avatar priyankinfinnov commented on May 5, 2024

Hey, thanx. I figured the Font Awesome thing tff thing. (forgot to incluce rnpm assest in package.json and react-native link).

But i also want to use the FontAwesome.chevronRight from the https://github.com/akveo/kittenTricks/blob/master/app/assets/icons.js file and i used the https://www.binaryhexconverter.com/hex-to-decimal-converter to replace the hex numbers with decimal as you suggested. It did remove the box with cross, but did not give the expected ">" or "<" sign, it shows a horizintal $ with dots. Please can you help.

from kittentricks.

priyankinfinnov avatar priyankinfinnov commented on May 5, 2024

I am, John. Hope you are having a great season too :)

I tried chevronRight: String.fromCharCode(61700), however still shows box with X not the "<" sign.

Also tried the way mentioned here #11 but unfortunately it does not work.

from kittentricks.

sergey-kozel avatar sergey-kozel commented on May 5, 2024

Hi @priyankinfinnov, @jbaek7023

@priyankinfinnov , are you still have this issue? I don't understand exactly from your comments do you see a crossed box or just incorrect symbol.
I think your problem is that you use not 'fontawesome' in a place where you expect to see a chevron. If you look at 'Kitten Tricks' code you will see that we apply correct font by defining appropriate fontfamily in rkType:

  RkTheme.setType('RkText', 'awesome', {
    fontFamily: 'fontawesome',
  });

So, if you have correct:

  1. Font in assets
  2. FontFamily style in your component
  3. The string value for this component

then all should work.

By the way, it is not necessary to specify decimal number in String.fromCharCode(61524). You can leave hex value there: String.fromCharCode(0xf054)

In case you still not be able to resolve your issue you can create a test project and we will see what the problem exactly you faced.

from kittentricks.

jbaek7023 avatar jbaek7023 commented on May 5, 2024

from kittentricks.

priyankinfinnov avatar priyankinfinnov commented on May 5, 2024

Thanks, i am using
<RkText rkType='awesome secondaryColor small'>{FontAwesome.chevronRight}</RkText>
from the file https://github.com/akveo/kittenTricks/blob/master/app/screens/navigation/sideMenu.js

still no success with chevronRight: String.fromCharCode(61524), nor with chevronRight: String.fromCharCode(0xf054),

Also tried putting the below in sidemenu.js

RkTheme.setType('RkText', 'awesome', {
  fontFamily: 'fontawesome',
});

By Box with X i mean screenshot

from kittentricks.

sergey-kozel avatar sergey-kozel commented on May 5, 2024

It's hard to say then what is the reason for your issue. I suggest you create some small project from scratch and if it will not work publish it as I proposed earlier. We can talk more detailed then.

from kittentricks.

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.