Okay, so I'm trying to write a code to a template that can reference a font stored on a server. This needs to be done without installing it on the user's system. Any ideas?

///rEI

Recommended Answers

All 5 Replies

Flash


Matti Ressler
Suomedia

Flash is not a possibility. This is being done within a PDF. The software I'm using lets me embed Javascript in the PDF to use in the backend.
EG:

var alignment = Field("ChooseAlign");
var textColor = Field("ChooseColor");
var textSize = Field("ChooseSize");

return '<color Name="'+textColor+'"><p br=false quad="'+alignment+'"><z newsize="'+textSize+'">'+Field("line1")+'</p>';

Any Fields are accessible through the backend. So, the user can pick the text in "line1", alignment, color, and size. I can set the input to text field or drop-down menu.

The really odd thing is that I've never seen some of the tags that come up if I generate some code through it (like quad):

<p style="(no style)" br="false" override="true" quad="C" findent="0" lindent="0" rindent="0" leadbefore="0" leadafter="0" widows="2" kerning="true" hyphenate="true" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false"><tracking newsize="0.000000"><f Name="Helvetica"><z newsize="20.0"><color Name="Black">Formatting Sample

If its PDF you can embed the fonts in the PDF


Matti Ressler
Suomedia

I can and have been embedding them, but there are 50+ fonts, and they add up. The load times are horrendous, and I'm trying to cut down by only loading the one font that is being accessed. Hence why I'm trying to load them from offsite.

///rEI

50 fonts??? Are you selling them?

If there are just a few characters in each font, it might be faster to put the parts with these fonts into a .gif or .jpg file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.