Ticket #58552: otherFloat.patch

File otherFloat.patch, 606 bytes (added by ballapete (Peter "Pete" Dyballa), 5 years ago)

Fix computation of 96.f / 72.f

  • src/hb-coretext.

    old new  
    5454   *
    5555   * https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html
    5656   */
    57   ptem *= 96.f / 72.f;
     57  ptem *= ((CGFloat)96.f) / ((CGFloat)72.f);
    5858  return (CGFloat) (ptem <= 0.f ? HB_CORETEXT_DEFAULT_FONT_SIZE : ptem);
    5959}
    6060static float
    6161coretext_font_size_to_ptem (CGFloat size)
    6262{
    63   size *= 72. / 96.;
     63  size *= ((CGFloat)96.f) / ((CGFloat)72.f);
    6464  return size <= 0 ? 0 : size;
    6565}
    6666