[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/reports/src/adapters/filters/Standard/_bas...
From: |
Jason Cater |
Subject: |
gnue/reports/src/adapters/filters/Standard/_bas... |
Date: |
Mon, 13 Jan 2003 01:29:52 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 03/01/13 01:29:50
Modified files:
reports/src/adapters/filters/Standard/_base/psutils:
FontMetrics.py
PrinterDefinition.py
Added files:
reports/src/adapters/filters/Standard/_base/psutils:
PSOutputStream.py
Log message:
misc work
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/psutils/PSOutputStream.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/psutils/FontMetrics.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/psutils/PrinterDefinition.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue/reports/src/adapters/filters/Standard/_base/psutils/FontMetrics.py
diff -c
gnue/reports/src/adapters/filters/Standard/_base/psutils/FontMetrics.py:1.1
gnue/reports/src/adapters/filters/Standard/_base/psutils/FontMetrics.py:1.2
*** gnue/reports/src/adapters/filters/Standard/_base/psutils/FontMetrics.py:1.1
Sun Jan 12 13:55:45 2003
--- gnue/reports/src/adapters/filters/Standard/_base/psutils/FontMetrics.py
Mon Jan 13 01:29:50 2003
***************
*** 0 ****
--- 1,92 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or (at your option) any later version.
+ #
+ # GNU Enterprise is distributed in the hope that it will be
+ # useful, but WITHOUT ANY WARRANTY; without even the implied
+ # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ # PURPOSE. See the GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2003 Free Software Foundation
+ #
+ # FILE:
+ # FontMetrics.py
+ #
+ # DESCRIPTION:
+ # Class that encapsulates a postscript Font Metric (AFM) file
+ #
+ # NOTES:
+ #
+
+ import string
+ from gnue.common.FileUtils import openResource
+
+ class FontMetrics:
+
+ def __init__(self, location):
+ if hasattr(location,'read'):
+ handle = location
+ close = 0
+ else:
+ handle = openResource(location)
+ close = 1
+
+ # Parse the file
+ stack = [self]
+ current = self
+ boostrap = 1
+ for line in handle.readlines()
+ line = line.strip()
+
+ if not len(line) or line[:7] == 'Comment':
+ continue
+
+ if line[:3] == 'End':
+ stack.pop()
+
+ elif line[:5] == 'Start':
+ if bootstrap:
+ continue
+ bootstrap = 0
+ else:
+ current = {'CharMetrics': CharMetrics,
+ 'KernPairs': KernPairs,
+ 'Composites': Composites}
+
+ stack.append(current)
+ else:
+ stack[self].addLine(line)
+
+ if close:
+ handle.close()
+
+
+ class _Encapsulation:
+ def addLine(self, line):
+ stuff = line.split()
+ self.__dict__[stuff[0]] = string.join(stuff[1:],' ')
+
+ class CharMetrics(_Encapsulation):
+ def addLine(self, line):
+ stuff = line.split()
+ self.__dict__[stuff[0]] = string.join(stuff[1:],' ')
+
+ class KernPairs(_Encapsulation):
+ def addLine(self, line):
+ stuff = line.split()
+ self.__dict__[stuff[0]] = string.join(stuff[1:],' ')
+
+ class Composites(_Encapsulation):
+ def addLine(self, line):
+ stuff = line.split()
+ self.__dict__[stuff[0]] = string.join(stuff[1:],' ')
+
\ No newline at end of file
Index:
gnue/reports/src/adapters/filters/Standard/_base/psutils/PrinterDefinition.py
diff -c
gnue/reports/src/adapters/filters/Standard/_base/psutils/PrinterDefinition.py:1.1
gnue/reports/src/adapters/filters/Standard/_base/psutils/PrinterDefinition.py:1.2
***
gnue/reports/src/adapters/filters/Standard/_base/psutils/PrinterDefinition.py:1.1
Sun Jan 12 13:55:45 2003
---
gnue/reports/src/adapters/filters/Standard/_base/psutils/PrinterDefinition.py
Mon Jan 13 01:29:50 2003
***************
*** 0 ****
--- 1,36 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or (at your option) any later version.
+ #
+ # GNU Enterprise is distributed in the hope that it will be
+ # useful, but WITHOUT ANY WARRANTY; without even the implied
+ # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ # PURPOSE. See the GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2003 Free Software Foundation
+ #
+ # FILE:
+ # FontMetrics.py
+ #
+ # DESCRIPTION:
+ # Class that encapsulates a postscript printer description (ppd) file
+ #
+ # NOTES:
+ #
+
+
+ class PrinterDefinition:
+
+ def __init__(self, location):
+
+
+
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/reports/src/adapters/filters/Standard/_bas...,
Jason Cater <=