~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/csh
 
2
# -*- mode:SH; -*-
 
3
#
 
4
# This script creates series of bdf files from TTF file.
 
5
#
 
6
#
 
7
# Please set up parameters
 
8
#
 
9
# Font dpi:
 
10
set DPI=96
 
11
 
 
12
#
 
13
# TrueType files dir.
 
14
set ttf_dir=~/ttf
 
15
 
 
16
# TTF files, please specify only base name
 
17
# Script will try to use BolD, Italic and BoldItalic versions of face
 
18
set FACES="ARIAL ARIBLK  ARIALN TAHOMA TIMES VERDANA"
 
19
 
 
20
 
 
21
# Output codepage
 
22
# koi8.r
 
23
# windows.1251
 
24
# iso8859.5
 
25
# iso8859.2
 
26
set LANG_ID=koi8.r
 
27
 
 
28
foreach x ( 7 8 9 10 11 12 14 16 18 20 24 30 50 100 150)
 
29
foreach z ( $FACES )
 
30
set y = ${ttf_dir}/${z}
 
31
#
 
32
# Simple face
 
33
 if( -e ${y}.TTF ) then
 
34
     echo ${y} at ${x}pt
 
35
     ./ttf2bdf  -m $LANG_ID -p $x -r $DPI ${y}.TTF | bdftopcf | compress > ${DPI}dpi/${z}${x}.pcf.Z
 
36
 endif
 
37
#
 
38
# Bold face
 
39
 if( -e ${y}BD.TTF ) then
 
40
    echo Bold ${y} at ${x}pt
 
41
    ./ttf2bdf  -m $LANG_ID -p $x -r $DPI -w bold  ${y}BD.TTF | bdftopcf | compress > ${DPI}dpi/${z}bd${x}.pcf.Z
 
42
 endif
 
43
#
 
44
# Italic face
 
45
 if( -e ${y}I.TTF ) then
 
46
    echo Italic ${y} at ${x}pt
 
47
    ./ttf2bdf  -m $LANG_ID -p $x -r $DPI -s o  ${y}I.TTF | bdftopcf | compress >${DPI}dpi/${z}i${x}.pcf.Z
 
48
 endif
 
49
#
 
50
# Bold Italic face
 
51
 if( -e ${y}BI.TTF ) then
 
52
    echo Bold Italic ${y} at ${x}pt
 
53
    ./ttf2bdf  -m $LANG_ID -p $x -r $DPI -w bold -s o  ${y}BI.TTF | bdftopcf | compress > ${DPI}dpi/${z}bi${x}.pcf.Z
 
54
 endif
 
55
end                                                                     
 
56
end
 
57
 
 
58
echo Creating fonts directory...
 
59
cd ${DPI}dpi
 
60
mkfontdir