@evejweinberg:
The code you’re using will work great when you upload it to a server. But since it is missing the protocol, it will look on your computer (the file:// protocol) for ‘use.typekit.com’. Adding https or http (depending on where you’ll be hosting this document) will resolve the issue for local testing.
I’m a super beginner with code, so I’m still not getting this to work. I haven’t attempted to upload yet, but I need it to work local so I can ensure the kerning is correct. Can I reference the type file from the internet by using a snippet similar to this in Hype? :
This snippet doesn’t do the trick, but maybe something similar? Or since I’m doing this local for now, should I reference a local path? i’m not sure what protocol means.
Thx,
Eve
Oh, and I should mentioned that I also tried using the code @gasspence pasted and that did not work either.
So, I added ‘localhost’ to my typekit domain, but still no dice, so I ended up adding the fonts locally into the resources folder in Hype, following the “Declaring an @font-face style” instructions from the original link: http://tumult.com/hype/documentation/3.0/#adding-fonts
Actually, this process only loaded one weight and I need both the ‘Reg’ weight and the ‘Semi-bold’ weight . I’m following the “Declaring an @font-face style” steps. I’m getting confused at step #7, because when I load in my CSS (image attached) something goes wrong. If I load NO text in that field, then Hype loads the ‘regular’ version of the font. I need regular and semi-bold.
I see the instruction to use $(resourceFolderName) but do not understand how to replicate that syntax.
@strmiska - thx so much! Please see my image attached. I am unsure what my ‘resourcesFolderName’ is because when I dragged the fonts into the resources folder, they are all loose in there, not within another folder. There is also this green ‘T’ icon called DDG-proxima.
I tried what you see in the picture, as well as just the word resources, like this:
You’re super close – just wrap the code block in <style>... <style>. The ‘Embedded Head HTML’ area places the code that field within the <head> of the document, so it could be anything.
Wrapping it in style tags will ensure that your document reads that code as CSS. Your full code would be: http://j.mp/1MlQ61O
so close!
I used your code (wrapped mine in style tags) and it looked like it worked in the ‘CustomCSS Font loader screen’ but then Hype wont actually let me apply it to the text. It bounces back to whatever it was before. I thought maybe Hype does not support multi-weighted fonts, so then I tried to only use the code for the Semi-bold, but that does not display as semi-bold - it displays as regular.
Attached are the code I used to create the semi-bold version of the font, and a gif of what happens.
And thx!! so much for your patience here.
Very odd. We’ve seen this issue once before where the .otf file didn’t exist. Can you double check that the spelling is correct for the OTF font?
Also, can you attach your document (or send me a private message… click ‘private message’ here).
I’m also a bit confused – when using typekit, you typically don’t get access to the font files – they are usually served from their server. Did you download a package of fonts from Typekit?
Thx Daniel,
I actually dont see the ‘private message’ option on your profile page, so i’ll respond here.
I was attempting to load the font family both ways - via typekit, and also using my own files. Sorry for that confusion. The path we’ve been discussing back-and-forth today was using my own local files, because using Typekit also did not give me access to all weights.
Thank you so much for helping me - i’m trying to use Hype for client work and I hope this works out for future projects! I’m really excited about this app.
You’re using {resources} -- but it should be {resourcesFolderName}. The full URL to one of your files would be: url(’${resourcesFolderName}/Filename.otf’)