quran / quran.com-images

images using fonts from King Fahed Complex / qurancomplex.org
http://quran.com
390 stars 125 forks source link

How to use database and font in android #5

Open ghost opened 8 years ago

ghost commented 8 years ago

Assalamualaikum.

i'm new in android. how to use the sqlite database and fonts in android ?

thank you

sharabash commented 8 years ago

the guy who can answer this best is gone for at least a week, just a heads up

On Mon, May 2, 2016, 5:15 AM Paijo RX notifications@github.com wrote:

Assalamualaikum.

i'm new in android. how to use the sqlite database and fonts in android ?

thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/quran/quran.com-images/issues/5

Mr-DDDAlKilanny commented 8 years ago

There are many toturials on interent about that. This is a good start http://www.tutorialspoint.com/android/android_sqlite_database.htm

ghost commented 8 years ago

sorry about my question before. what i mean is how to use madani.sqlite3.db and fonts(QCF_P001.TTF) to generate image of some ayah to display on view in android?

ahmedre commented 8 years ago

sorry for the delay - basically, the database file has a table with some columns - the sura number, ayah number, page number, line on the page, and the text. if you want to actually use this information to draw images yourself (instead of using the images this project generates for you), you basically just need to display the text in the database using the font corresponding to the page.

in other words, to display the ayah 1 of surah fatiha, you'd use QCF_P001.TTF (since the page number is 1, so for sura Nas, you'd use QCF_P604.TTF), and you'd draw the text that's present in the table where page is 1, sura is 1, ayah is 1, and line is 1.

tanker06 commented 3 years ago

How to use fonts is not clear, for example, if I want to choose Surah al Imran, and there are generally other inscriptions appear.