Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Iconic methods are not accessible. #34

Closed
shshalom opened this issue Aug 15, 2016 · 10 comments
Closed

Iconic methods are not accessible. #34

shshalom opened this issue Aug 15, 2016 · 10 comments

Comments

@shshalom
Copy link

It seems you've forgot to set access control in Iconic class.

@dzenbot
Copy link

dzenbot commented Aug 15, 2016

Which APIs are you trying to access? You should only use the APIs from the auto-generated class.

@shshalom
Copy link
Author

This one in particular: Iconic.registerFont("FontAwesome", map: FontAwesomeIconMap)
But in general I've notice that I can't even extend using extension because the entire class is set as internal by default.

@dzenbot
Copy link

dzenbot commented Aug 15, 2016

Isn't this related to #33?

@shshalom
Copy link
Author

No, that's an unrelated to #33.
The ReadMe file shows this:

You can also register the font with its family name and unicode mapping:

Iconic.registerFont("FontAwesome", map: FontAwesomeIconMap)

But registerFont method is not exposed as public.

@dzenbot
Copy link

dzenbot commented Aug 15, 2016

Totally forgot to update the docs. Sorry about that!

@dzenbot
Copy link

dzenbot commented Aug 15, 2016

In theory, you should not need to call Iconic.registerFont("FontAwesome", map: FontAwesomeIconMap) anymore since registerIconFont() does it for you internally.

@shshalom
Copy link
Author

Got it. while we're at it, if I provide a font that is a custom font which was built over another FontAwesome file, with different name and different icons... the generated class creates this:
Iconic.registerFont("FontAwesome", map: MyFontIconMap)
Notice that it sets the "FontAwesome" instead of "MyFont".

That's another reason for asking to expose registerFont as public.

@dzenbot
Copy link

dzenbot commented Aug 15, 2016

That is because it grabs the font's postscript name to create the class and specially, to register to the font manager.

@shshalom
Copy link
Author

I figure that much, I guess I could edit the file and change the postscript name to solve this.

@dzenbot
Copy link

dzenbot commented Aug 16, 2016

I generally use Glyph app for editing font files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants