Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-07 16:30:20

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Path to font with zem_ir

Trying to get the zem_ir plugin running.
Would like to use the fontdir attribute to specify where my font is. Tried all sorts of things here, like:

<code>fontdir:“http://www.mysite.url/font.ttf”</code>
<code>fontdir:“font.ttf”</code>
<code>fontdir:“wwwroot/font.ttf”</code> and so on…

(Have also tried the font attribute with no luck)
It just keep sying Error: The server is missing the specified font

Anyone?

Offline

#2 2005-12-07 18:08:55

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Path to font with zem_ir

It has to be an absolute path, like what you set for the tmp dir in the admin prefs.

Offline

#3 2005-12-07 18:34:38

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Path to font with zem_ir

Also: I have had limited success with mac fonts, when a windows equivalent seems to work just fine.

Offline

#4 2005-12-07 18:38:15

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: Path to font with zem_ir

Use only .ttf (windows) font. I think it is in the plugin help. ;-)

anyway truetype “classic” Mac suitcases are not “.ttf” files they have no extension at all.

Last edited by Niconemo (2005-12-07 18:43:11)


Nico

Offline

#5 2005-12-07 19:50:27

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Path to font with zem_ir

Ok. Thanx. Got passed the path-to-font problem, but now…

Error: unable to create cache folder

tried with and without cachedir (absolute path) even built the zir directory manually and made it 777… still doesn´t work.

Last edited by skoggy (2005-12-07 20:05:24)

Offline

#6 2005-12-07 21:09:59

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Path to font with zem_ir

Just to really confuse you, cachedir is supposed to be relative to the document root.

Offline

#7 2005-12-08 16:44:38

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Path to font with zem_ir

Ok. I think I got it… halfway there anyway. It seems to produce a .png but it´s totally blank. Tried changing background and font color, changed the size but still nothing but a blank .png

Will try some other stuff I can think of…

Opened the .png files in image ready and they look fine. But they doesn´t show on the site…

Last edited by skoggy (2005-12-08 17:01:55)

Offline

#8 2005-12-09 10:19:32

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Path to font with zem_ir

Hmmm… after a couple of test with various attributes from the documentation, still nothing. May this be a css problem by now?

The tag I use:
<code><txp:zem_ir fontdir=“mypath/” font=“PORCELAI.ttf” cachedir=“mypath/images/zir” backgroundcolor=”#fff” color=”#000” fontsize=22 wraptag=“h2” ><txp:title /></txp:zem_ir></code>

No class assigned (wouldn´t know the css to use anyway)

It´s supposed to show to the left on my testpage (below the articles title)

And as I said, it produces a .png but nothing shows…
(Testing with Firefox an IE)

Last edited by skoggy (2005-12-09 10:20:44)

Offline

#9 2005-12-09 11:12:56

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Path to font with zem_ir

The image url that is created is not correct. It should be url(/images/zir/image.png). If your site is not in a subdomain you don’t need to use the cachedir attribute.

Offline

#10 2005-12-09 12:31:51

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Path to font with zem_ir

Still don´t get it I´m afraid…

But when I remove the attribute it says: Error: unable to create cache folder
So I added the folder manually, used cachedir and then the .png:s were made.

Do you mean it should be: <code>cachedir=“http://www.mysite.se/images/zir/image.png”</code> ?

Tried that too…
Sorry, feel kinda stupid but I´m really thankful for your help.

Offline

#11 2005-12-09 16:34:54

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Path to font with zem_ir

As far as I know it should be something like cachedir="/yourimagedirectory/zir". For the sites where I’m using this plugin that are in the root of the domain, I don’t have this attribute in the tag. If you don’t specify it, the /zir/ directory will be created in your default images directory.

I am having the same results as you though if the site is in a subdomain, the png is created but there is no output. The reason for this is that the output is url(/images/zir/image.png), and that is leading to the image directory of the subdomain. But when creating the image, it is stored in the image directory of the root domain. So far I haven’t found a better way to handle this than copy every new png that is created from the root image directory to the subdomain image directory… Fortunately this is a rather static site :/ I didn’t find a way to specify the cachedir so that it works.

Anyway, it seems unlikely that this is your problem because your site is not in a subdomain. On the other hand, the behaviour does seem very much alike. To verify that the zir directory where the plugin is trying to find the image is in your image directory, you can do this: leave the attribute cachedir out of your tag. Then on the page where the image should appear choose ‘view background image’. You will get a 404 Not Found, but this way you can see the full url to where the image is supposed to be. It should be yoursite.com/images/zir/image.png.
The fact that the png is created must mean that it is stored somewhere, so you can search your domain on the server if there is an images/zir directory elsewhere that contains the png.

I’m aware that this doesn’t offer you a solution, but it might give you some insight to what is happening. And if anyone knows the solution for the subdomain problem I’ll be happy to hear it.

Offline

Board footer

Powered by FluxBB