Last change
on this file since 17735 was
17735,
checked in by grum, 12 years ago
|
version 3.5.4 - fix minor bug & add new functions to framework
|
-
Property svn:executable set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | <?php |
---|
2 | /*- |
---|
3 | * Copyright (c) 2009 Laurent VUIBERT |
---|
4 | * License : GNU Lesser General Public License v3 |
---|
5 | */ |
---|
6 | |
---|
7 | class odsFontFace { |
---|
8 | private $fontName; // = "Nimbus Sans L"; |
---|
9 | private $fontFamilyGeneric; |
---|
10 | private $fontPitch; |
---|
11 | |
---|
12 | public function __construct($fontName, $fontFamilyGeneric = null, $fontPitch = 'variable') { |
---|
13 | $this->fontName = $fontName; |
---|
14 | $this->fontFamilyGeneric = $fontFamilyGeneric; |
---|
15 | $this->fontPitch = $fontPitch; |
---|
16 | } |
---|
17 | |
---|
18 | public function getContent(ods $ods, DOMDocument $dom) { |
---|
19 | $style_font_face = $dom->createElement('style:font-face'); |
---|
20 | $style_font_face->setAttribute("style:name", $this->fontName); |
---|
21 | $style_font_face->setAttribute("svg:font-family", "'".$this->fontName."'"); |
---|
22 | $style_font_face->setAttribute("style:font-family-generic", $this->fontFamilyGeneric); |
---|
23 | $style_font_face->setAttribute("style:font-pitch", $this->fontPitch); |
---|
24 | return $style_font_face; |
---|
25 | } |
---|
26 | |
---|
27 | public function getFontName() { |
---|
28 | return $this->fontName; |
---|
29 | } |
---|
30 | |
---|
31 | public function getStyles(ods $ods, DOMDocument $dom) { |
---|
32 | return $this->getContent($ods,$dom); |
---|
33 | } |
---|
34 | } |
---|
35 | |
---|
36 | |
---|
37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.