[reportlab-users] How to get a list of available fonts?

Proboscis Admin reportlab-users@reportlab.com
Wed, 10 Sep 2003 15:36:38 +0100


--Apple-Mail-2--1001947060
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

to be honest I had the same problem but I just copied the fonts I 
needed from that folder to the font folder in reportlab then used that 
code in the user guide or yours.

code:

from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
reportlab.rl_config.warnOnMissingFontGlyphs = 0
pdfmetrics.registerFont(TTFont('Arial', 'c\reportlab\fonts\Arial.ttf 
etc'))
                                                       ^font name        
      ^font location

it should work.

:-)

On Wednesday, September 10, 2003, at 03:25 PM, 
reportlab@sarcastic-horse.com wrote:

> I found a bunch of fonts in C:\\WINNT\FONTS. I checked in rl_config.py,
> and c:/winnt/fonts is listed in there.  However, getAvailableFonts()
> didn't list any of these.  Is there some trick to using TTF fonts in
> particular?
>
>
>> there fonts in windows pre installed, i think its under program files
>> then under fonts. the whole list of them is there so you could use
>> those.
>>
>> ;-)
>> On Wednesday, September 10, 2003, at 02:40 PM,
>> reportlab@sarcastic-horse.com wrote:
>>
>>> In my case, reportlab/Fonts just had three text files: a readme and 
>>> two
>>> licenses.  Boohoo.  I use Windows 2k; are there some other fonts
>>> elsewhere
>>> that I should copy to reportlab/Fonts, or point to in rl_config?
>>>
>>> I think the default PDF fonts are probably good for now though.
>>>
>>> Muchas gracias.
>>>
>>>
>>>
>>>
>>>> hi,
>>>>
>>>> If you go to your reportlab folder there is a file inside 'Fonts'
>>>> available fonts are there.
>>>>
>>>> there is a way you can use other ttf. fonts(which is what I did) the
>>>> code for that is in the userguide.
>>>>
>>>>
>>>>   ;-)
>>>>
>>>> On Wednesday, September 10, 2003, at 02:19 PM,
>>>> reportlab@sarcastic-horse.com wrote:
>>>>
>>>>> Hi-
>>>>>
>>>>> I tried 'Arial' and got a key error.  How do I get a list of
>>>>> available
>>>>> fonts?
>>>>>
>>>>> Thanks.
>>>>> _______________________________________________
>>>
>>>
>>>
>>

--Apple-Mail-2--1001947060
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
	charset=US-ASCII

to be honest I had the same problem but I just copied the fonts I
needed from that folder to the font folder in reportlab then used that
code in the user guide or yours.


code:


<fontfamily><param>Geneva</param>from reportlab.pdfbase import
pdfmetrics

from reportlab.pdfbase.ttfonts import TTFont</fontfamily>

<fontfamily><param>Geneva</param>reportlab.rl_config.warnOnMissingFontGlyphs
= 0

pdfmetrics.registerFont(TTFont('Arial', 'c\reportlab\fonts\Arial.ttf
etc'))

                                                      ^font name            
^font location


it should work.


:-)

</fontfamily>

On Wednesday, September 10, 2003, at 03:25 PM,
reportlab@sarcastic-horse.com wrote:


<excerpt>I found a bunch of fonts in C:\\WINNT\FONTS. I checked in
rl_config.py,

and c:/winnt/fonts is listed in there.  However, getAvailableFonts()

didn't list any of these.  Is there some trick to using TTF fonts in

particular?



<excerpt>there fonts in windows pre installed, i think its under
program files

then under fonts. the whole list of them is there so you could use

those.


;-)

On Wednesday, September 10, 2003, at 02:40 PM,

reportlab@sarcastic-horse.com wrote:


<excerpt>In my case, reportlab/Fonts just had three text files: a
readme and two

licenses.  Boohoo.  I use Windows 2k; are there some other fonts

elsewhere

that I should copy to reportlab/Fonts, or point to in rl_config?


I think the default PDF fonts are probably good for now though.


Muchas gracias.





<excerpt>hi,


If you go to your reportlab folder there is a file inside 'Fonts'

available fonts are there.


there is a way you can use other ttf. fonts(which is what I did) the

code for that is in the userguide.



  ;-)


On Wednesday, September 10, 2003, at 02:19 PM,

reportlab@sarcastic-horse.com wrote:


<excerpt>Hi-


I tried 'Arial' and got a key error.  How do I get a list of

available

fonts?


Thanks.

_______________________________________________

</excerpt></excerpt>



</excerpt>

</excerpt></excerpt>
--Apple-Mail-2--1001947060--