| 114 | |
| 115 | |
| 116 | void GPostscriptPort::SetCurrentFont (GBaseFont &font) |
| 117 | { |
| 118 | std::string face = font.GetName(); |
| 119 | if (font.IsBold() || font.IsItalic()) |
| 120 | { |
| 121 | face += "-"; |
| 122 | if (font.IsBold()) |
| 123 | face += "Bold"; |
| 124 | if (font.IsItalic()) |
| 125 | face += "Italic"; |
| 126 | } |
| 127 | /* |
| 128 | // Duh -- need to do this earlier, perhaps scan the list of |
| 129 | // fonts already created and output those... |
| 130 | // Store this font in the list of fonts we need for our document |
| 131 | int found = DocumentFonts.find_first_of (face, 0); |
| 132 | if ((found < 0) || (found > DocumentFonts.length())) |
| 133 | { |
| 134 | if (DocumentFonts.length() > 0) |
| 135 | DocumentFonts += ", "; |
| 136 | DocumentFonts += face; |
| 137 | } |
| 138 | */ |
| 139 | PostscriptStream << std::endl; |
| 140 | PostscriptStream << "/" << face << " findfont" << std::endl; |
| 141 | PostscriptStream << font.GetSize () << " scalefont" << std::endl; |
| 142 | PostscriptStream << "setfont" << std::endl; |
| 143 | PostscriptStream << std::endl; |
| 144 | } |
| 145 | |
| 146 | |
| 147 | // Mac |