Applying custom fonts to a survey

Hi i want to apply custom font to my survey, can anybody help me to achieve this.it is very important for one of my project.

What custom font is it? Are you using mobile forms (Collect) or web forms (Enketo)?

i am using Collect and i want to use (Jameel Noori Nastaleeq) font in application

Hi @noman.s2325,

To use a custom font, you need to install that font on the device. After that you can use "Custom styling" feature of XLSForm e.g. you can enter <span style='font-family:"Jameel Noori Nastaleeq"'>اپنا نام</span> in your Form's XLS to show label with Jameel Noori Nastaleeq font.

Having said that installing a custom font on an android device is not an easy task. There are some manufacturers who let you do that by default. And there are few applications in the Play Store that can install fonts for few manufacturers. I use Pixel and tried few apps from the store but none of them works for Pixel. Depending on your project and the devices used, you may be able to install the font.

If you are able to install custom font for your project, I would recommend using Google's Noto Nastaliq Urdu font instead, because it is open-source.

Last point, this is a general android ecosystem problem that the default font for Urdu is not pleasing to eyes and all Urdu speakers would like to see Nastaliq font on our devices, with the release of Noto Nastaliq font I am hopeful that it will be available on all devices soon. There is a feature request about that on Android issue tracker, you may want to take a look at and up vote it.

Thanks,

Sadiq

2 Likes

Thank you very much Sadiq.
Can you share some example link xlsform which i can test...

I have attached a sample Form below. Here's how it looks on an android emulator with NotoNastaliqUrdu font installed:



For the benefit of the larger community, with the default font, it looks like this:



Sample Form:

UrduForm.xlsx (578.5 KB)

2 Likes

Thank you for sharing this! It was very helpful - I had a follow up question - this font only applies to the label text and not to the options. Is there a way to apply the font to the answer options as well?

You would have to include the style tags for each option label. That's certainly not very practical!

Would it make sense to consider bundling the open source font with Collect? Does anyone ever want the default Urdu font?

1 Like

That will be great! I have checked various popular Urdu newspaper websites from Pakistan and India, all are using either Nafees Nataliq or Nafees Nakhsh font. So I don't think anybody would be unhappy not to see default font.

Which font we choose will come down to a technical question i.e. can we allow or support diagonally growing text because Nataliq font grows that way, see:

Nataliq is pleasing to my eyes but Nakhsh is safer choice.

2 Likes

Hi Sadiq,

You're right to bring up the technical considerations. It's true that Naskh is often easier to implement in digital formats due to its linear, block-like structure. However, Nastaliq offers distinct advantages in terms of visual appeal and, for many readers, enhanced visibility...

As you attached the image for nastaliq font example , it is not an actual word, the longest complex urdu word is


and it is seems fine
i have already used nastaliq in different survey software like Sawtooth and Lime Survey and didn't face any kind of difficulties.

@LN
I think it would be great if you can add nastaliq font or any other font like nastaliq, because it would be great option for the Urdu/Arabic ODK Users.

Thanks