Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-7155

KeyView2: CreateFont call with FIXED_PITCH param does not return fixed width characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 0.4.5
    • Component/s: Win32SS
    • Labels:
      None

      Description

      KeyView2.exe from Petzolds CDROM doesnt work as expected.
      The text is not properly drawn.
      These are my findings:

      Text is being painted via the following calls:
      static TCHAR szTop[] = TEXT ("Message Key Char ")
      static TCHAR szUnd[] = TEXT ("_______ ___ ____ ")
      SelectObject (hdc, CreateFont (0, 0, 0, 0, 0, 0, 0, 0, dwCharSet, 0, 0, 0, FIXED_PITCH, NULL)) ;
      TextOut (hdc, 0, 0, szTop, lstrlen (szTop)) ;
      TextOut (hdc, 0, 0, szUnd, lstrlen (szUnd)) ;

      It should create a FIXED_PITCH, that means, forcing to have each letter the same width, and hence the underscores fits the letters.

      But as you can see in the screenshot, it doesn't happen.

        Attachments

        1. KeyView2.c
          8 kB
          vicmarcal
        2. KeyView2.exe
          24 kB
          vicmarcal
        3. keyview2.png
          58 kB
          vicmarcal

          Issue Links

            Activity

              People

              • Assignee:
                bug zilla Bug Zilla
                Reporter:
                vicmarcal vicmarcal
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: