KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::FONT Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::FONT:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 

Public Attributes

wxString Name = wxT( "CADSTAR" )
 
long Modifier1 = FONT_NORMAL
 It seems this is related to weight. 400=Normal, 700=Bold. More...
 
long Modifier2 = 0
 It seems this is always 0 regardless of settings. More...
 
bool KerningPairs
 From CADSTAR Help: "Kerning Pairs is for causing the system to automatically reduce the spacing between certain pairs of characters in order to improve the appearance of the text". More...
 
bool Italic = false
 

Detailed Description

Definition at line 332 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::FONT::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 267 of file cadstar_archive_parser.cpp.

268{
269 wxASSERT( aNode->GetName() == wxT( "FONT" ) );
270
271 Name = GetXmlAttributeIDString( aNode, 0 );
272 Modifier1 = GetXmlAttributeIDLong( aNode, 1 );
273 Modifier2 = GetXmlAttributeIDLong( aNode, 2 );
274
275 XNODE* cNode = aNode->GetChildren();
276
277 for( ; cNode; cNode = cNode->GetNext() )
278 {
279 wxString cNodeName = cNode->GetName();
280
281 if( cNodeName == wxT( "ITALIC" ) )
282 Italic = true;
283 else if( cNodeName == wxT( "KERNING" ) )
284 KerningPairs = true;
285 else
286 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
287 }
288}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:44
XNODE * GetChildren() const
Definition: xnode.h:62
XNODE * GetNext() const
Definition: xnode.h:67
long Modifier2
It seems this is always 0 regardless of settings.
bool KerningPairs
From CADSTAR Help: "Kerning Pairs is for causing the system to automatically red...
long Modifier1
It seems this is related to weight. 400=Normal, 700=Bold.

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), and THROW_UNKNOWN_NODE_IO_ERROR.

Member Data Documentation

◆ Italic

bool CADSTAR_ARCHIVE_PARSER::FONT::Italic = false

◆ KerningPairs

bool CADSTAR_ARCHIVE_PARSER::FONT::KerningPairs
Initial value:
=
false

From CADSTAR Help: "Kerning Pairs is for causing the system to automatically reduce the spacing between certain pairs of characters in order to improve the appearance of the text".

Definition at line 337 of file cadstar_archive_parser.h.

◆ Modifier1

long CADSTAR_ARCHIVE_PARSER::FONT::Modifier1 = FONT_NORMAL

It seems this is related to weight. 400=Normal, 700=Bold.

Definition at line 335 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings().

◆ Modifier2

long CADSTAR_ARCHIVE_PARSER::FONT::Modifier2 = 0

It seems this is always 0 regardless of settings.

Definition at line 336 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::FONT::Name = wxT( "CADSTAR" )

Definition at line 334 of file cadstar_archive_parser.h.


The documentation for this struct was generated from the following files: