CAIRO — There are 28 letters in the Arabic alphabet. There are four possible written forms for each letter, depending on whether it stands alone, or comes at the beginning, middle or end of a word. Then there are diacritic symbols, indicating the script's correct pronunciation, which hover gently above or below each letter's lines and curves.

What does this all spell out? A tough challenge for aspiring Arabic font designers.

"There is no content online for learning Arabic type design, so for designers who are self-taught like myself, it's very difficult to learn," says Mohammed Gaber, founder of Kief type foundry.

Gaber is the creator of the Cairo Font — the first free open-source Arabic, Urdu and Farsi typeface available in six thicknesses (or weights, in type-speak), developed to match the popular Latin typeface family, Titillum web. The font, with its wide-based letters and short vertical lines, is used in the poster for the Cairo Now! City Incomplete exhibition at Dubai Design Week.

With the boom in Arabic content online — only expected to increase in coming years — there's renewed interest in type design in the Middle East.

Type designers, the calligraphers of our digital age, face several struggles — dealing with the inherent difficulties of designing Arabic fonts, creating a market for and promoting their work, and striking a balance between the essentially ornamental nature of Arabic scripts and the utility and readability that modern type display requires.

"You want to be pretty but practical," says Gaber. "You want to break the rules but not break them too far."

Kief is one of a handful of type foundries that have sprung up in the region recently, and Gaber's aim is to build up a culture of type design in local markets. The number of available Latin fonts still vastly outnumbers the existing Arabic ones perhaps because most software is initially developed to support, and developed in regions which use, Latin scripts.

"I don't really like it when people say that Arabic is more difficult, because Latin isn't that easy either," he says. "But Arabic definitely takes more work." Gaber recently published three new open-source fonts and shared the source files so that other aspiring type designers can build on his work. This can cut the effort involved in font building from scratch by half.

When designing a font, Gaber refers to one or more of the classical Arabic calligraphy scripts as his "skeleton," taking the angular grids of the Kufi script, and combining it with the slopes of Thuluth and the simple curvature of Ruq'ah, to create something new.

"When working on the Cairo font I used Kufi as the perfect starting point," says Gaber. "Not depending on one of the classical fonts makes it look like a mess."

Design initiative Khotout West El Balad ("downtown lines"), jointly created last year by Ismaelia for Real Estate Development and the JWT Cairo ad agency, have reversed this process. Instead of working from the classical scripts, its designers took to the streets of downtown Cairo to document signs and storefronts to see what they could bring from the urban environment to their computer screens.

The result is six new fonts, also available for free download, on the Khotout West El Balad website.

One of these, a slim, high-reaching, rectangular font called Nefertari, takes its style from a travel company of the same name. Another, Maktab Rita ("Rita's Office") combines the fonts of an office building sign and the nearby Rita church. "We wanted the fonts to have a story behind them," says Ibrahim Islam, head of design and branding at JWT. "It's not just the visual aspect that's important."

After a four-month research and design process, in which Islam, Ghalia Elsrakbi and Haytham Nawar worked with design students from the German University in Cairo, the fonts were launched in January. They were a hit. The Madinet El Batt was used, for example, by well-known band Masar Egbari for their new music video, Cherophobia, and by students in jewelry maker Azza Fahmy's design school.

Although much of Khotout West El Balad's research found signs based in the common Arabic scripts, they were able to document and work from what Islam calls "free fonts" commonly found in hand-written signs, ones that don't follow the conventional calligraphic rules. Using these as the base for digital fonts gave designers the freedom to alter the proportions of letters and add more stylized design elements. But it was something akin to reinventing the wheel.

"The free fonts were like prototypes," explains Islam. "But because you only have a few of the letters, the ones that are on the sign, you have to make the rest to match."

The prototype for one Khotout West El Balad font, Safwat, doesn't rely on any pre-existing script but on a series of geometric shapes. The font has a 1970s modernist feel.

The project's second stage is convincing shop owners to use these new fonts in their renovations. Although they've had some success — Islam tells me that a Khotout West El Balad font was recently used in the refurbished storefront of an auction house in downtown's Kodak Passageway — the impact of the new fonts on the environment that inspired them has been slow.

"People are resistant, even when I say we'll do it for free. Some people don't want to change their fonts out of sentimentality, and some people don't see the value in the aesthetic," says Islam, who believes urban signage should be regulated in order to achieve a certain visual coherence.

"Back in the day, they had rules about proportions," he says. "Only 30 percent of the space of signs were allowed to display Latin writing — the other 70 percent had to be Arabic."

Khotout West El Balad is working on a 200-page book documenting its research, as well as on an upcoming round of workshops.

Noha Zayed is concerned about documentation. During years of travel in Egypt and around the region, she has hunted for hand-painted calligraphy, on signs, trucks and old advertisements. Her resulting photographs are set to be published mid-2017 in a book created in collaboration with Basma Hamdy, entitled Found Khatt.

"I'm trying to document this tradition before it disappears, replaced by digital alternatives," says Zayed, who explains that her book is a reflection on the tradition of Arabic calligraphy and lettering, and the social and cultural function they serve.

Often, murals with accompanying text painted on the side of homes depict a plane and the Kaaba, signifying that someone in this household has completed the Hajj. Truck drivers, who spend much of their time on the road, often have the names of their children painted on their vehicles, taking the thought of family with them during long absences, while bus drivers tend to opt for holy verses to invoke protection as they make their way along Egypt's dangerous highways.

"Historically, Arabic calligraphy has a sort of sanctity to it," said Zayed, who also helps curate the "Arabic typography" Instagram account, which posts examples from all over the region.

Traditionally, good handwriting was also a sign of education, and a skill that commanded respect. "Before the age of computers, no scholar who had bad handwriting had any credibility," says Gaber, who believes designers must balance between digital practicality and credible aesthetic.

"The possibilities for combinations are endless, and that's the beauty of Arabic script," says Islam, adding that new fonts take time to assimilate and become easily readable because people aren't used to them.

The market is still very much under development, says Gaber, who, along with other young type designers, continues to plow through the Arabic script's dots and curves, carving out new ways of communicating beauty and meaning.

"What we want to say is, you don't have to go to Linotype in Germany to have your own font," he says. "You can do that right here in the Middle East."

See more from Culture / Society here