Code Monkey home page Code Monkey logo

Comments (9)

odrobnik avatar odrobnik commented on June 11, 2024

I think all you have to do is register the font in info.plist and then just specify it's font family in the HTML.

from dtcoretext.

recepkocur avatar recepkocur commented on June 11, 2024

Thank you for your quick answer. Yes, added UIAppFonts from info.plist. However, the article could not see properly.

from dtcoretext.

odrobnik avatar odrobnik commented on June 11, 2024

You have to specify the correct font family via style attribute or default font family. NOT the font name.

Sent from my iPad

On 12.04.2011, at 21:39, recepkocur [email protected] wrote:

Thank you for your quick answer. Yes, added UIAppFonts from info.plist. However, the article could not see properly.

Reply to this email directly or view it on GitHub:
https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML/issues/20#comment_991581

from dtcoretext.

recepkocur avatar recepkocur commented on June 11, 2024

As you said; I could not do anything.

Results Screen: http://people.sabanciuniv.edu/recepkocur/img1.png
customfont.zip in xcode: http://people.sabanciuniv.edu/recepkocur/img3.png
TextEdit screen: http://people.sabanciuniv.edu/recepkocur/img2.png

from dtcoretext.

odrobnik avatar odrobnik commented on June 11, 2024

those are definitely not the correct family names. courier only works like this because I'm hardcoding it to "Courier New".

You'd have to find out the appropriate font-family name.

On 12.04.2011, at 22:13, recepkocur wrote:

As you said; I could not do anything.

Results Screen: http://people.sabanciuniv.edu/recepkocur/img1.png
TextEdit screen: http://people.sabanciuniv.edu/recepkocur/img2.png

Reply to this email directly or view it on GitHub:
https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML/issues/20#comment_991805

from dtcoretext.

recepkocur avatar recepkocur commented on June 11, 2024

Please see: http://people.sabanciuniv.edu/recepkocur/american_niloofar.png

  1. Safari browser worked. I've loaded XN Niloobar.ttf to Mac and added the font under the font-family name testxb.
  2. The font XB Niloobar.ttf was registered in Info.plist. AmericanTypeWriter was not.
  3. Worked, registered the XB Niloofar.ttf in info.plist
  4. Worked, didn't register the american font in info.plist (http://iosfonts.com/ see ios fonts available for ipad)

I hope we can solve this problem.

from dtcoretext.

odrobnik avatar odrobnik commented on June 11, 2024

Please send me the font and HTML snippet. I might have a chance to investigate tomorrow.

Sent from my iPhone

On 13.04.2011, at 16:22, recepkocur [email protected] wrote:

Please see: http://people.sabanciuniv.edu/recepkocur/american_niloofar.png

  1. Safari browser worked. I've loaded XN Niloobar.ttf to Mac and added the font under the font-family name testxb.
  2. The font XB Niloobar.ttf was registered in Info.plist. AmericanTypeWriter was not.
  3. Worked, registered the XB Niloofar.ttf in info.plist
  4. Worked, didn't register the american font in info.plist (http://iosfonts.com/ see ios fonts available for ipad)

I hope we can solve this problem.

Reply to this email directly or view it on GitHub:
https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML/issues/20#comment_995654

from dtcoretext.

recepkocur avatar recepkocur commented on June 11, 2024

Orjinal niloofar font: http://people.sabanciuniv.edu/recepkocur/niloofar.zip or http://wiki.irmug.org/index.php/X_Series_2

html snippet from styles.html:

<p dir="rtl" style="font-family:'XB Niloofar';font-size:24px">بِسْمِ اللّٰهِ</p>
<right><p style="font-family:'AmericanTypewriter';font-size:20px">AmericanTypewriter</p></right>

from dtcoretext.

odrobnik avatar odrobnik commented on June 11, 2024

Fixed two bugs preventing loading of custom fonts. Note: DIR=RTL is not yet supported, but will be inferred by CoreText if the font is implicitly RTL. Note: font-family for AmericanTypewriter is 'American Typewriter'.

from dtcoretext.

Related Issues (20)

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.