Using Fonts

Home Forums Procoding Using Fonts

This topic contains 4 replies, has 1 voice, and was last updated by  Ian Lawrence 2 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1106

    Ian Lawrence

    Is it possible touring a font into proceeding on iOS as a resource. I have tried with a .TTC, and using a pjs directive on one of the pde files,but no joy (although this works on the wild web).

    eg: http://supportingphysicsteaching.net/CMR/falling/addingForces.html, which accesses cambria.TTC on a remote url…

    Thanks

    Ian

    PS I tried the contact me, but both filling-in and not-filling-in the spam trap trapped me.115

    #1107

    audiocommander
    Keymaster

    Hi Ian,

    sorry for moving your post, but it had little to do with the topic.

    From you link, I recon you are talking about processing.js. Using fonts with processing is not straightforward and really as complicated as you can get it.
    See http://processingjs.org/reference/createFont_/ and http://processingjs.org/reference/loadFont_/ for details.

    With HTML5/JavaScript, using fonts is much easier, as long as the browser recognises the font format. I recommend using a webfont e.g. like seen on http://www.fontsquirrel.com. This creates the required font formats for all major browsers and the relevant CSS styles. Note however, that this will only work for HTML5 and native JavaScript projects that support CSS.

    Hope this helps,
    Best,
    Michael

    ps: just checked the contact form and it worked?
    Just add “cold” and it should be okay.

    #1120

    Ian Lawrence

    Thanks. I did try ‘cold’, resisting the temptation to query the question. It was processingjs, which I seem to have beaten into submission on the open web re fonts (mostly by re-reading that manual until it finally sunk i), and have been footling with processingjs and procoding for a while. The facility to use multiple pdes is neat for what I want to do, and maybe it’ll be a good dev environment even without the fonts fixed(and maybe the Mac desktop edition, which I currently don’t own). Sadly, there is much more at http://supportingphysicsteaching.net/, all of which predates the foray into processing, and where the Cambria font is heavily used (mostly through css styling, so I may be in luck). I’ll have another footle, and see how I do. It could be something as simple as swapping to .ttf, rather than using the .TTC bundle.

    Thanks again for the rapid response.

    Ian

    #1121

    audiocommander
    Keymaster

    Hi Ian,

    sorry, not sure if I get everything of what you’re saying,
    but just to make sure:

    – ttc is not supported on the browser (as far as I’m aware of)
    – processingjs cannot convert a font that it doesn’t know. So, you first have to make sure that this font is available to the browser (.ttf is not supported by all browsers!)

    Dealing with fonts in processing/processingjs is really a little more complicated than it could be (IMHO).

    I forgot to add another quite important link that explains a bit more how creating a PFont in processingjs works:
    http://processingjs.org/reference/font/

    Best,
    Michael

    #1122

    Ian Lawrence

    Just for the record, importing a .ttf version of the font from DropBox as a resource seems to work well: there may be more trouble ahead, but that’s fine for now…

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Using Fonts’ is closed to new replies.