diff --git a/EgtGeomKernel.vcxproj b/EgtGeomKernel.vcxproj
index 85d8843..0fb9680 100644
--- a/EgtGeomKernel.vcxproj
+++ b/EgtGeomKernel.vcxproj
@@ -476,6 +476,7 @@ copy $(TargetPath) \EgtProg\Dll64
+
diff --git a/EgtGeomKernel.vcxproj.filters b/EgtGeomKernel.vcxproj.filters
index f25d243..371b337 100644
--- a/EgtGeomKernel.vcxproj.filters
+++ b/EgtGeomKernel.vcxproj.filters
@@ -854,6 +854,9 @@
File di intestazione
+
+ File di intestazione
+
diff --git a/FontConst.h b/FontConst.h
new file mode 100644
index 0000000..ef4a5f2
--- /dev/null
+++ b/FontConst.h
@@ -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 ;
diff --git a/FontNfe.cpp b/FontNfe.cpp
index e7df713..e3a2807 100644
--- a/FontNfe.cpp
+++ b/FontNfe.cpp
@@ -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 ;
diff --git a/FontOs.cpp b/FontOs.cpp
index 3db4e1b..443d7c1 100644
--- a/FontOs.cpp
+++ b/FontOs.cpp
@@ -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 ;