@@ -100,6 +100,10 @@ internal class PageContextProcessor {
100100
101101 private ProcessorContext context ;
102102
103+ /// <summary>The logger.</summary>
104+ private static readonly ILog LOGGER = LogManager . GetLogger ( typeof ( iText . Html2pdf . Attach . Impl . Layout . PageContextProcessor
105+ ) ) ;
106+
103107 /// <summary>Instantiates a new page context processor.</summary>
104108 /// <param name="properties">the page context properties</param>
105109 /// <param name="context">the processor context</param>
@@ -157,19 +161,18 @@ internal static float GetMaxContentWidth(PageMarginBoxContextNode pmbcNode, Proc
157161 strategy . NextGlyphs ( ) ;
158162 PdfFont currentFont = strategy . GetCurrentFont ( ) ;
159163 if ( currentFont == null ) {
160- //TODO(DEVSIX-1050) Warn and use pdf default
164+ LOGGER . Warn ( iText . Html2pdf . LogMessageConstant . UNABLE_TO_RETRIEVE_FONT ) ;
161165 try {
162166 currentFont = PdfFontFactory . CreateFont ( ) ;
163167 }
164168 catch ( System . IO . IOException ) {
169+ LOGGER . Error ( iText . Html2pdf . LogMessageConstant . ERROR_LOADING_FONT ) ;
165170 }
166171 }
167- //TODO throw exception further?
168172 return currentFont . GetWidth ( content , fontSize ) ;
169173 }
170174
171175 internal static float GetMinContentWidth ( PageMarginBoxContextNode node , ProcessorContext context ) {
172- //TODO(DEVSIX-1050): reread spec to be certain that min-content-size does in fact mean the same as max content
173176 return GetMaxContentWidth ( node , context ) ;
174177 }
175178
@@ -936,8 +939,7 @@ private float[] CalculateDistribution(float argA, float argC, float flexA, float
936939 float flexRatioA ;
937940 float flexRatioC ;
938941 float flexSpace ;
939- if ( sum == 0 ) {
940- //TODO(DEVSIX-1050) float comparison to zero, revisit
942+ if ( CssUtils . CompareFloats ( sum , 0f ) ) {
941943 flexRatioA = 1 ;
942944 flexRatioC = 1 ;
943945 }
0 commit comments