Skip to main content



      Home
Home » Archived » BIRT » BIRT FONTS
BIRT FONTS [message #164265] Wed, 24 May 2006 12:36 Go to next message
Eclipse UserFriend
Hi.I have a question. From where does BIRT retrieves all the required
fonts?

Cristian
Re: BIRT FONTS [message #164301 is a reply to message #164265] Wed, 24 May 2006 13:59 Go to previous messageGo to next message
Eclipse UserFriend
I found this code below while browsing in BIRT Report Engine source code.
Hope this helps you.

I found it while looking for a way to register my own fonts in a separate
directory using PDFRenderContext:
PDFRenderContext renderContext = new PDFRenderContext();
renderContext.setEmbededFont(false);
renderContext.setFontDirectory(/usr/local/app/test/fonts);

No luck so far.

Regards,
Borut

/**
* Registers fonts in some probable directories. It usually works in
Windows,
* Linux and Solaris.
*
* @return the number of fonts registered
*/
private static int registerDirectories()
{
int count = 0;
count += FontFactory.registerDirectory("C:/windows/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("d:/windows/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("e:/windows/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("f:/windows/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("g:/windows/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("C:/WINNT/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("d:/WINNT/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("e:/WINNT/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("f:/WINNT/fonts"); //$NON-NLS-1$
count += FontFactory.registerDirectory("g:/WINNT/fonts"); //$NON-NLS-1$

count += FontFactory.registerDirectory("/usr/X/lib/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/share/fonts/default/TrueType ");
//$NON-NLS-1$

count +=
FontFactory.registerDirectory("/usr/openwin/lib/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/iso_8859_2/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/iso_8859_5/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/iso_8859_7/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/iso_8859_9/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/iso_8859_13/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/iso_8859_15/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/ar/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/hi_IN.UTF-8/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/ja/X11/fonts/TT ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/ko/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/ko.UTF-8/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/KOI8-R/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/ru.ansi-1251/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/zh_TW/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/zh_HK.BIG5HK/X11/fonts/TT ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/zh/X11/fonts/TrueType ");
//$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/openwin/lib/locale/zh.GBK/X11/fonts/TrueType ");
//$NON-NLS-1$

count +=
FontFactory.registerDirectory("/usr/X11R6/lib/X11/fonts/TrueType "); /* RH
7.1+ */ //$NON-NLS-1$
count +=
FontFactory.registerDirectory("/usr/X11R6/lib/X11/fonts/truetype "); /* SuSE
*/ //$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/X11R6/lib/X11/fonts/tt");
//$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/X11R6/lib/X11/fonts/TTF ");
//$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/X11R6/lib/X11/fonts/OTF ");
/* RH 9.0 (but empty!) */ //$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/share/fonts/ja/TrueType ");
/* RH 7.2+ */ //$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/share/fonts/truetype");
//$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/share/fonts/ko/TrueType ");
/* RH 9.0 */ //$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/share/fonts/zh_CN/TrueType ");
/* RH 9.0 */ //$NON-NLS-1$
count += FontFactory.registerDirectory("/usr/share/fonts/zh_TW/TrueType ");
/* RH 9.0 */ //$NON-NLS-1$
count +=
FontFactory.registerDirectory("/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType ");
/* Debian */ //$NON-NLS-1$


"Cristian" <ceol.gael@gmail.com> wrote in message
news:029c0556b9c2157551f649a8789054dd$1@www.eclipse.org...
> Hi.I have a question. From where does BIRT retrieves all the required
> fonts?
>
> Cristian
>
Re: BIRT FONTS [message #164332 is a reply to message #164301] Wed, 24 May 2006 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi Borut. Thanks for the info. Please let me know in which file have you
found this code.

Cristian
Re: BIRT FONTS [message #164339 is a reply to message #164301] Wed, 24 May 2006 15:20 Go to previous message
Eclipse UserFriend
Hi. Found the location, thanks.

Cristian
Previous Topic:Excel
Next Topic:Custom data source providers, anyone have success with this?
Goto Forum:
  


Current Time: Tue May 13 10:08:35 EDT 2025

Powered by FUDForum. Page generated in 0.06300 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top