Hi, There are more problems with this function. I already sent a patch for some: https://sourceforge.net/p/podofo/mailman/message/36486334/ Among other things it delegates CharWidth to UnicodeCharWidth. I attached a follow up patch which fixes the problem with division by 100 in UnicodeCharWidth among other things. I am not sure whether I already posted it.
On Mon, May 10, 2021 at 12:23 PM Christophe <xto...@gmail.com> wrote: > Hello all, > > I have a doubt relative to this method definition: > > double PdfFontMetricsFreetype::CharWidth( unsigned char c ) const > { > double dWidth = m_vecWidth[static_cast<unsigned int>(c)]; > > return dWidth * static_cast<double>(this->GetFontSize() * this > ->GetFontScale() / 100.0) / 1000.0 + > static_cast<double>( this->GetFontSize() * this->GetFontScale() / > 100.0 * this->GetFontCharSpace() / 100.0); > } > > The Char Space is divided by 100.0 and I think it is an error as it is not > the case for PdfFontMetricsObject::CharWidth, nor for > PdfFontMetricsObject::CharWidth. > > What do you think ? > > Thank you > > Christophe > _______________________________________________ > Podofo-users mailing list > Podofo-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/podofo-users >
implement_glyph_width_for_object_metrics.patch
Description: Binary data
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users