Couple of ways to go about doing this. You could of course simply update the
XML file directly as part of your build/deployment process, which I suppose
would be my preferred way to go. In other words if you know as part of your
deployment process what font directories you're going to want to add, I'd
just update the XML file directly so those directories would be there when
the app fires up.

If that isn't an option for some reason, you can tap into the admin console
code to add font directories like so:
<cfapplication name="foo" sessionmanagement="true" />

<cfscript>
    session.auth.loggedIn = true;
    session.auth.password = "admin";

    fontCFC = CreateObject("component", "bluedragon.adminapi.Fonts");

    myFontDir = "/new/font/directory";

    fontCFC.setFontDirectory(myFontDir, "create");

    fontDirs = fontCFC.getFontDirectories();
</cfscript>

<cfdump var="#fontDirs#" />

The application and manually setting session variables is a bit of a kludge
that's necessary with the admin API at the moment, but we'll be revamping
all that for the next major release in April.

Note that the font directory you're adding must exist and be accessible by
the user under which OpenBD is running, because when you add a font
directory it does check to make sure it can read the directory.
-- 
Matthew Woodward
[email protected]
http://blog.mattwoodward.com
identi.ca/Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to