Fonts on Windows

Hi, I am wondering whicht font-formats are supported for Windows and which options I have to make them work. I have an OpenType (PS) font that is installed on my system. As I am working on a program that should run locally this should be enough. On OSX it works perfectly. But I now have to port it to Windows where I also installed the font (and it e.G. works with native Processing and "createFont") but it will not show my text in the desired font. What could be the reason for this? Could it be that I have to use a different name to point to the font? (Is there something like PFont.list()?) Or are only several file formats supported?

Just out of curiosity: If I want a p5js sketch make available online on a website. How do I have to provide the fonts in that case? thanks allot for your help!



  • Answer ✓

    Ok. "solved" it myself. Windows weirdly grouped some of my Fonts (DINCondensed). Namely the Medium, Black and Bold got grouped into "DinCond"… Regular was there as a single font. So by calling "DinCond" instead of "DinCond-Bold" I could use the right font. Had to call "textStyle(BOLD)" beforehand to make it display properly. Im implement Medium and Black I head to add MEDIUM as "500" and BLACK as "900" to the p5 constants and modify the textStyle function it self.. but in the end.. it worked..

  • great! keep in mind that the fonts will only show up in browsers on other computers that have the same fonts you are using. you can look into webfonts if you want something more universally supported. this usually involves linking to something in the of your html file that adds support for fonts that are hosted elsewhere on the internet.

Sign In or Register to comment.