Paths in .ttfimport files

jam's picture

Is there a way to use path directives or relative paths in .ttfimport files? For example,

%windir%\Fonts\Arial.ttf

or even a relative path under the project like

Content\Arial.ttf

Not everyone on the team keeps their Windows directory at C:\Windows, and I'd like to be able to use one set of source files for the whole team. Any ideas?

Thanks in advance.

jam's picture

oops, looks like the code

oops, looks like the code tag wasn't working... here's what it should have been:

<Path>%windir%\Fonts\Arial.ttf</Path> ... or

<Path>Content\Arial.ttf</Path>

Cygon's picture

Already working!

(Sorry, the code and blockcode tags currently only work when you've disabled TinyMCE (the wysisyg editor), because it replaces <code> with &lt;code&gt;...)

You can already specify relative paths in the .ttfimport file (actually, that's the way it I'm using it myself!), they are always relative to the project directory. So, if you've got a file Content\Fonts\Arial.ttfimport set up and want to store Arial.ttf in the same directory for easier distribution of your project among team members, just write

<Path>Content/Fonts/Arial.ttfimport</Path>

in your .ttfimport file and it will work!

Environment variables are not resolved yet, but it sounds like a good thing to implement for the next release ;)

jam's picture

Aha

It turns out I'm an idiot and I was just getting the relative path wrong. Thanks for the help!

On another note, is there a full API document somewhere that I've just missed? Thanks again.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <br> <a> <em> <strong> <u> <i> <b> <cite> <blockcode> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre> <span>
  • You can highlight code with any of the following tags: <blockcode>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.