quran.com-images
quran.com-images copied to clipboard
How to derive the actual sura_number for sura or bismillah line types?
I am able to generate the line types for page 604 with a query like so
I can cross-reference the sura_number by joining the glyph_ayah table like so:
However, the above only works for "ayah" line types because the glyph_ids for sura and bismillah types are not in glyph_ayah table.
Did I miss something? like a glyph_sura and glyph_bismillah table :)
or is this info you never needed in this image generating project.
Any pointers would be helpful. Thank you.
At least for Sura, you can get the respective details by:
select gpl.page_number, gpl.line_number, glyph_type_meta as sura from glyph_page_line as gpl left join glyph on gpl.glyph_id = glyph.glyph_id where gpl.page_number=604 and glyph_type_meta <> 0 and line_type='sura';