Ticket #554: mbitter.draw_text.patch

File mbitter.draw_text.patch, 808 bytes (added by thomas0782, 9 years ago)
  • navit/graphics/win32/graphics_win32.c

     
    970964        angle += 360;
    971965
    972966    SetTextAlign (gr->hMemDC, TA_BASELINE) ;
    973     SetViewportOrgEx (gr->hMemDC, p->x, p->y, NULL) ;
    974967    font->lf.lfEscapement = font->lf.lfOrientation = ( angle * 10 ) ;
    975968    DeleteObject (font->hfont) ;
    976969
    977970    font->hfont = CreateFontIndirect (&font->lf);
    978971    HFONT hOldFont = SelectObject(gr->hMemDC, font->hfont );
    979972
     973    TEXTMETRIC tm;
     974    GetTextMetrics(gr->hMemDC, &tm);
     975    SetViewportOrgEx (gr->hMemDC, p->x, p->y - tm.tmDescent , NULL) ;
     976
    980977    {
    981978        wchar_t utf16[1024];
    982979        const UTF8 *utf8 = (UTF8 *)text;