MCPcopy Create free account
hub / github.com/Smorodov/Multitarget-tracker / SetCurrentFont

Method SetCurrentFont

src/Tracker/graph/gport.cpp:116–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115
116void 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

Callers

nothing calls this directly

Calls 4

GetNameMethod · 0.80
IsBoldMethod · 0.80
IsItalicMethod · 0.80
GetSizeMethod · 0.80

Tested by

no test coverage detected