---------------------------------------------------------------------------
| 191 | } |
| 192 | //--------------------------------------------------------------------------- |
| 193 | bool TMyFont::Load(TMYIniFile * f, char * Section) |
| 194 | { |
| 195 | bool bRetVal = true; |
| 196 | try |
| 197 | { |
| 198 | strncpy(Name, f->ReadString(Section, "FontName").c_str(), 31); |
| 199 | Name[31] = NULL; |
| 200 | if( strlen(Name)<=0 ) |
| 201 | { |
| 202 | strcpy(Name, "Tahoma"); |
| 203 | bRetVal = false; |
| 204 | } |
| 205 | Height = f->ReadInteger(Section, "FontHeight", -13); |
| 206 | Pitch = (TFontPitch)f->ReadInteger(Section, "FontPitch", 0); |
| 207 | PixelsPerInch = f->ReadInteger(Section, "FontPixelsPerInch", 120); |
| 208 | Size = f->ReadInteger(Section, "FontSize", 8); |
| 209 | Style = (BYTE)f->ReadInteger(Section, "FontStyle", 0); |
| 210 | Color = (TColor)f->ReadInteger(Section, "FontColor", clBlack); |
| 211 | } |
| 212 | catch(...) { bRetVal = false; } |
| 213 | return bRetVal; |
| 214 | } |
| 215 | //--------------------------------------------------------------------------- |
| 216 | bool TMyFont::Save(TMYIniFile * f, char * Section) |
| 217 | { |
nothing calls this directly
no test coverage detected