equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include "GDSFCOMP.H" |
19 #include "gdsfcomp.h" |
20 #include "TOOLSVER.H" |
20 #include "toolsver.h" |
|
21 |
|
22 #include <sstream> |
21 |
23 |
22 int GdsFontCompiler::WriteFont() |
24 int GdsFontCompiler::WriteFont() |
23 { |
25 { |
24 int index=0; |
26 int index=0; |
25 index=WriteHeader(); |
27 index=WriteHeader(); |
153 buf[width] ='\0'; |
155 buf[width] ='\0'; |
154 for(int i=0;i<num;i++) |
156 for(int i=0;i<num;i++) |
155 WriteFormattedData(buf,1); |
157 WriteFormattedData(buf,1); |
156 } |
158 } |
157 |
159 |
158 void GdsFontCompiler::WriteFormattedData(char* aData,int aNewLine) |
160 void GdsFontCompiler::WriteFormattedData(const char* aData,int aNewLine) |
159 { |
161 { |
160 if(aData) |
162 if(aData) |
161 iOutputFile << aData; |
163 iOutputFile << aData; |
162 if(aNewLine) |
164 if(aNewLine) |
163 WriteNewLine(); |
165 WriteNewLine(); |
164 } |
166 } |
165 |
167 |
166 void GdsFontCompiler::WriteFormattedData(int aNum,int aNewLine) |
168 void GdsFontCompiler::WriteFormattedData(int aNum,int aNewLine) |
167 { |
169 { |
168 char numbuf[16]; |
170 std::stringstream ss; |
169 _itoa(aNum,numbuf,10); |
171 |
170 WriteFormattedData(numbuf,aNewLine); |
172 ss << aNum; |
|
173 |
|
174 WriteFormattedData(ss.str().c_str(), aNewLine); |
171 } |
175 } |
172 |
176 |
173 void GdsFontCompiler::WriteNewLine() |
177 void GdsFontCompiler::WriteNewLine() |
174 { |
178 { |
175 iOutputFile << "\n"; |
179 iOutputFile << "\n"; |