Git Product home page Git Product logo

quran.com-images's Introduction

بسم الله الرحمن الرحيم In the name of Allah, Most Gracious, Most Merciful

Quran Image Generator

These are a set of scripts that generate Quran page images based on the old madani fonts provided by the King Fahd Quran Complex in Saudi Arabia. They are currently being used in quran.com and its mobile apps.

This script outputs images, and also updates a database with the bounds of each of the generated glyphs (allowing apps to highlight individual words or verses).

The code is copyleft GPL (read: free) but the actual fonts and pages (in the res/fonts directory) belong to the King Fahd Quran Complex in Saudia Arabia

Installation Summary

perl Makefile.PL
make
make install
mysql -u root -p your_password < sql/schema.sql
mysql -u root -p your_password < sql/database.sql
mysql -u root -p your_password -e "create user 'nextgen'@'localhost' identified by 'nextgen'"
mysql -u root -p your_password -e "grant all privileges on nextgen.* to 'nextgen'@'localhost'"
mysql -u root -p your_password -e "flush privileges"

Usage

generate page 50 with a width of 1300:

./script/generate.pl --width 1300 --output ./output/ --pages 50

generate pages 1 through 3 with a width of 1300:

./script/generate.pl --width 1300 --output ./output/ --pages 1..3

Compression

make sure to run the images through ImageOptim or through zopflipng to get optimized images.

zopflipng --prefix=out/ --lossy_transparent --lossy_8bit --splitting=2 --iterations=100 *.png

Ayah by ayah images

For generating ayah by ayah images, see our legacy branch

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.