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 313 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 260 of file cadstar_archive_parser.cpp.

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

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 318 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 316 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 317 of file cadstar_archive_parser.h.

◆ Name

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

Definition at line 315 of file cadstar_archive_parser.h.


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