Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom font #1

Open
Ashraf-Ali-aa opened this issue Feb 3, 2016 · 3 comments
Open

Custom font #1

Ashraf-Ali-aa opened this issue Feb 3, 2016 · 3 comments

Comments

@Ashraf-Ali-aa
Copy link

@ksss cool gem I was wondering does it support Arabic font also would it be possible to set a different colours for each letter.

@ksss
Copy link
Owner

ksss commented Feb 4, 2016

Thank you @ashraf-ali-ca .

support Arabic font

This gem depend on FreeType ( http://www.freetype.org/ ).
I think it raise an error FreeType::Error::Cannot_Open_Resource when set fonts FreeType doesn't support.

I agree that this is a problem.
Do you have a sample of Arbic font?

different colours for each letter

I can't come up with a good CLI-API...
Do you have any good idea?

@Ashraf-Ali-aa
Copy link
Author

@ksss here is an Arabic font https://www.google.com/fonts#UsePlace:use/Collection:Scheherazade also some Arabic text.

رَبِّ شَقِيًّا

Am still learning Ruby but you could just a have a dictionary of colours and map it to a sequence of letters i.e if a text contains an 'AA' = blue or 'Ab' = red etc and allow the user to load custom dictionary.

@ksss
Copy link
Owner

ksss commented Feb 7, 2016

Thank you.
I got a font file.

It seems can read from FreeType.
But I checked that This gem dose not support right to left script.

Custom dictionary...hmm.
It seems over engineering for me.
I'll think about it.
But I might not be able to expect that.

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

No branches or pull requests

2 participants