EgtGeomKernel :

- correzioni a testi con altezza nulla fatta sui font.
This commit is contained in:
Dario Sassi
2018-02-12 07:54:48 +00:00
parent 6cf3040131
commit 856b928ff7
5 changed files with 42 additions and 2 deletions
+1
View File
@@ -476,6 +476,7 @@ copy $(TargetPath) \EgtProg\Dll64</Command>
<ClInclude Include="DllMain.h" />
<ClInclude Include="ExtText.h" />
<ClInclude Include="FontAux.h" />
<ClInclude Include="FontConst.h" />
<ClInclude Include="FontManager.h" />
<ClInclude Include="GdbExecutor.h" />
<ClInclude Include="CurveArc.h" />
+3
View File
@@ -854,6 +854,9 @@
<ClInclude Include="IntersLineTria.h">
<Filter>File di intestazione</Filter>
</ClInclude>
<ClInclude Include="FontConst.h">
<Filter>File di intestazione</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="EgtGeomKernel.rc">
+18
View File
@@ -0,0 +1,18 @@
//----------------------------------------------------------------------------
// EgalTech 2018-2018
//----------------------------------------------------------------------------
// File : FontConst.h Data : 11.02.18 Versione : 1.9b2
// Contenuto : Dichiarazione delle costanti per i font.
//
//
//
// Modifiche : 11.02.18 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
//----------------------------------------------------------------------------
const double FNT_MIN_HEIGHT = 0.1 ;
const double FNT_MAX_LINTOL_TO_H = 0.01 ;
+10 -1
View File
@@ -15,6 +15,7 @@
#include "stdafx.h"
#include "FontNfe.h"
#include "FontAux.h"
#include "FontConst.h"
#include "/EgtDev/Include/EGkGeomDB.h"
#include "/EgtDev/Include/EGkGdbIterator.h"
#include "/EgtDev/Include/EGkCurve.h"
@@ -103,7 +104,7 @@ NfeFont::SetCurrFont( const string& sFont, int nWeight, bool bItalic,
// salvo i dati
m_nWeight = nWeight ;
m_bItalic = bItalic ;
m_dHeight = dHeight ;
m_dHeight = max( dHeight, FNT_MIN_HEIGHT) ;
m_dRatio = dRatio ;
m_dAddAdvance = dAddAdvance ;
@@ -314,6 +315,10 @@ NfeFont::ApproxWithLines( const string& sText, int nInsPos, double dLinTol, doub
if ( IsNull( pIter))
return false ;
// controllo valore tolleranza lineare
if ( dLinTol > FNT_MAX_LINTOL_TO_H * m_dHeight)
dLinTol = max( FNT_MAX_LINTOL_TO_H * m_dHeight, EPS_SMALL) ;
// calcolo i fattori di scala
double dScaY = m_dHeight / m_dHCap ;
double dScaX = dScaY * m_dRatio ;
@@ -397,6 +402,10 @@ NfeFont::ApproxWithArcs( const string& sText, int nInsPos, double dLinTol, doubl
if ( IsNull( pIter))
return false ;
// controllo valore tolleranza lineare
if ( dLinTol > FNT_MAX_LINTOL_TO_H * m_dHeight)
dLinTol = max( FNT_MAX_LINTOL_TO_H * m_dHeight, EPS_SMALL) ;
// calcolo i fattori di scala
double dScaY = m_dHeight / m_dHCap ;
double dScaX = dScaY * m_dRatio ;
+10 -1
View File
@@ -15,6 +15,7 @@
#include "stdafx.h"
#include "FontOs.h"
#include "FontAux.h"
#include "FontConst.h"
#include "/EgtDev/Include/EGkGeomDB.h"
#include "/EgtDev/Include/EGkGdbIterator.h"
#include "/EgtDev/Include/EGkCurve.h"
@@ -89,7 +90,7 @@ OsFont::SetCurrFont( const string& sFont, int nWeight, bool bItalic,
// salvo i dati
m_nWeight = nWeight ;
m_bItalic = bItalic ;
m_dHeight = dHeight ;
m_dHeight = max( dHeight, FNT_MIN_HEIGHT) ;
m_dRatio = dRatio ;
m_dAddAdvance = dAddAdvance ;
@@ -339,6 +340,10 @@ OsFont::ApproxWithLines( const string& sText, int nInsPos, double dLinTol, doubl
if ( hPrevFont == nullptr)
return false ;
// controllo valore tolleranza lineare
if ( dLinTol > FNT_MAX_LINTOL_TO_H * m_dHeight)
dLinTol = max( FNT_MAX_LINTOL_TO_H * m_dHeight, EPS_SMALL) ;
// calcolo i fattori di scala
double dScaY = m_dHeight / m_dHCap ;
double dScaX = dScaY * m_dRatio ;
@@ -421,6 +426,10 @@ OsFont::ApproxWithArcs( const string& sText, int nInsPos, double dLinTol, double
if ( hPrevFont == nullptr)
return false ;
// controllo valore tolleranza lineare
if ( dLinTol > FNT_MAX_LINTOL_TO_H * m_dHeight)
dLinTol = max( FNT_MAX_LINTOL_TO_H * m_dHeight, EPS_SMALL) ;
// calcolo i fattori di scala
double dScaY = m_dHeight / m_dHCap ;
double dScaX = dScaY * m_dRatio ;