[Bug 7117] fasmw 1.67.18 displays text files poorly ('Courier New' replacement font needed)

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Oct 30 16:19:48 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=7117

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
           Hardware|Other                       |x86-64
                 CC|                            |focht at gmx.net
            Summary|fasmw 1.67.18 displays text |fasmw 1.67.18 displays text
                   |files poorly unless you     |files poorly ('Courier New'
                   |install corefonts'          |replacement font needed)
                   |courier32                   |
             Status|REOPENED                    |RESOLVED
                 OS|other                       |Linux
          Component|-unknown                    |fonts
            Version|unspecified                 |0.9.28.

--- Comment #12 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

dupe of bug 20456 (Wine-Staging provides a 'Courier New' replacement) - even if
this bug is older, that one has better coverage.

You can also work around without 'winetricks' by just going to 'Options' ->
'Appearance' -> default selection 'Font' -> 'Change' and chose *any* font
listed ('Courier', ...) to get a proper editor/font rendering.
Or use Wine-Staging which has replacement font builtin.

App source 'SOURCE/IDE/FASMW.ASM':

--- snip ---
 _font_face db 'Courier New',0

...
  wmcreate:
    xor    eax,eax
    mov    [search_settings],eax
    mov    [search_string],al
    mov    [replace_string],al
    mov    [compiler_memory],65536
    mov    [compiler_priority],THREAD_PRIORITY_NORMAL
    mov    [assigned_file],-1
    mov    [help_path],0
    mov    [ofn.lStructSize],sizeof.OPENFILENAME
    mov    eax,[hwnd]
    mov    [ofn.hwndOwner],eax
    mov    eax,[hinstance]
    mov    [ofn.hInstance],eax
    mov    [ofn.lpstrCustomFilter],NULL
    mov    [ofn.nFilterIndex],1
    mov    [ofn.nMaxFile],1000h
    mov    [ofn.lpstrFileTitle],name_buffer
    mov    [ofn.nMaxFileTitle],100h
    mov    [ofn.lpstrInitialDir],NULL
    mov    [ofn.lpstrDefExt],_asm_extension
    mov    [font.lfHeight],16
    mov    [font.lfWidth],0
    mov    [font.lfEscapement],0
    mov    [font.lfOrientation],0
    mov    [font.lfWeight],0
    mov    [font.lfItalic],FALSE
    mov    [font.lfUnderline],FALSE
    mov    [font.lfStrikeOut],FALSE
    mov    [font.lfCharSet],DEFAULT_CHARSET
    mov    [font.lfOutPrecision],OUT_RASTER_PRECIS
    mov    [font.lfClipPrecision],CLIP_DEFAULT_PRECIS
    mov    [font.lfQuality],DEFAULT_QUALITY
    mov    [font.lfPitchAndFamily],FIXED_PITCH+FF_DONTCARE
    mov    edi,font.lfFaceName
    mov    esi,_font_face
...
--- snip ---

Trace log with default ('Courier New'):

--- snip ---
$ WINEDEBUG=+seh,+relay,+font wine ./FASMW.EXE >>log.txt 2>&1
...
002a:Call gdi32.CreateFontIndirectA(0040b82c) ret=004113a3
002a:trace:font:CreateFontIndirectExW (16 0 0 0 1 6 0 0 1) L"Courier New"    =>
0x20054
002a:Ret  gdi32.CreateFontIndirectA() retval=00020054 ret=004113a3
...
002a:Call user32.SendMessageA(00010096,00000030,00020054,00000000) ret=00411d79
002a:Call window proc 0x40c000
(hwnd=0x10096,msg=WM_SETFONT,wp=00020054,lp=00000000) 
...
002a:Call gdi32.SelectObject(001b0056,00020054) ret=0040d90e
002a:trace:font:freetype_SelectFont L"Courier New", h=16, it=0, weight=0,
PandF=01, charset=1 orient 0 escapement 0
002a:trace:font:freetype_SelectFont DC transform 1.000000 0.000000 0.000000
1.000000
002a:trace:font:freetype_SelectFont not in cache
002a:trace:font:freetype_SelectFont (it=0, bd=0) is selected for (it=0, bd=0)
002a:trace:font:freetype_SelectFont Chosen: L"Liberation Sans" L"Regular"
(L"/usr/share/fonts/liberation/LiberationSans-Regular.ttf"/(nil):0)
002a:trace:font:freetype_SelectFont font scale y: 1.000000
002a:trace:font:OpenFontFace
L"/usr/share/fonts/liberation/LiberationSans-Regular.ttf"/(nil), 0, 0 x 16
002a:trace:font:get_font_data Can't find table "VDMX"
002a:trace:font:OpenFontFace height 16 => ppem 14
002a:trace:font:select_charmap found cmap with platform_id 0, encoding_id 3
002a:trace:font:select_charmap found cmap with platform_id 3, encoding_id 1
002a:trace:font:freetype_SelectFont caching: gdiFont=0x162b78  hfont=0x20054
002a:trace:font:add_to_cache font 0x162b78
002a:trace:font:get_gasp_flags got flags 0001 for ppem 14
002a:trace:font:freetype_SelectFont font L"Courier New" 16 aa disabled by GASP
002a:trace:font:freetype_SelectFont 0x20054 L"Courier New" 16 aa 1
002a:trace:font:update_font_code_page charset 0 => cp 1252
002a:Ret  gdi32.SelectObject() retval=0001002e ret=0040d90e
002a:Call gdi32.GetTextExtentPoint32A(001b0056,0033f0cf "
8\x03\xd0{\xc8",00000001,0033f0c7) ret=0040d928
002a:trace:font:FONT_mbtowc mapped " " -> L" "
002a:trace:font:get_outline_text_metrics font=0x162b78
002a:trace:font:get_face_name name 2 found platform 3 lang 0409 L"Regular"
002a:trace:font:get_face_name name 4 found platform 3 lang 0409 L"Liberation
Sans"
002a:trace:font:get_face_name name 3 found platform 3 lang 0409 L"Ascender -
Liberation Sans"
002a:trace:font:get_outline_text_metrics OS/2 winA = 1854 winD = 434 typoA =
1491 typoD = -431 typoLG = 307 avgW 1208 FT_Face a = 1854, d = -434, h = 2355:
HORZ a = 1854, d = -434 lg = 67 maxY = 1864 minY = -621
002a:trace:font:freetype_GetTextExtentExPoint 0x162b78, L" ", 1
002a:trace:font:get_glyph_outline 0x162b78, 0020, 00000000, 0x33e89c, 00000000,
(nil), 0x7e733be4
002a:trace:font:get_glyph_outline font transform 1.000000 0.000000 0.000000
1.000000
002a:trace:font:get_glyph_outline 1,1,(0,0),4,0
002a:trace:font:GetTextExtentExPointW (0x1b0056, L" ", 0) returning 4x16
002a:trace:font:GetTextExtentPoint32A (0x1b0056 " " 1 0x33f0c7): returning 4 x
16
002a:Ret  gdi32.GetTextExtentPoint32A() retval=00000001 ret=0040d928
002a:Call gdi32.GetTextMetricsA(001b0056,0033f022) ret=0040d936
002a:Call user32.GetDpiForSystem() ret=7e6ab216
002a:Ret  user32.GetDpiForSystem() retval=00000060 ret=7e6ab216
002a:Call user32.GetDpiForSystem() ret=7e6ab216
002a:Ret  user32.GetDpiForSystem() retval=00000060 ret=7e6ab216
002a:trace:font:GetTextMetricsW text metrics:
    Weight = 400     FirstChar = 33     AveCharWidth = 8
    Italic =   0     LastChar = 64258         MaxCharWidth = 18
    UnderLined = 0     DefaultChar = 32     Overhang = 0
    StruckOut = 0     BreakChar = 33     CharSet = 0
    PitchAndFamily = 27
    --------------------
    InternalLeading = 2
    Ascent = 13
    Descent = 3
    Height = 16
...
002a:trace:font:dump_gdi_font_list ---------- Font Cache ----------
002a:trace:font:dump_gdi_font_list font=0x149348 ref=7 L"System" 16
002a:trace:font:dump_gdi_font_list font=0x160f50 ref=0 L"" 0
002a:trace:font:dump_gdi_font_list font=0x158be0 ref=0 L"MS Shell Dlg" -11
002a:trace:font:dump_gdi_font_list font=0x15a190 ref=0 L"MS Shell Dlg" -11
002a:trace:font:dump_gdi_font_list font=0x15d708 ref=0 L"Tahoma" -11
002a:trace:font:dump_gdi_font_list font=0x15b938 ref=0 L"Tahoma" -11 
--- snip ---

Trace log with 'Courier' selection:

--- snip ---
...
002a:Call gdi32.CreateFontIndirectW(0033c624) ret=7e41625e
002a:trace:font:CreateFontIndirectExW (13 8 0 0 31 3 2 1 0) L"Courier"    =>
0x30117
002a:Ret  gdi32.CreateFontIndirectW() retval=00030117 ret=7e41625e
002a:Call gdi32.SelectObject(000100f2,00030117) ret=7e416268
002a:trace:font:freetype_SelectFont L"Courier", h=13, it=0, weight=400,
PandF=31, charset=0 orient 0 escapement 0
002a:trace:font:freetype_SelectFont DC transform 1.000000 0.000000 0.000000
1.000000
002a:trace:font:freetype_SelectFont not in cache
002a:trace:font:freetype_SelectFont (it=0, bd=0) is selected for (it=0, bd=0)
002a:trace:font:freetype_SelectFont 13 is better for 13 diff was 0
002a:trace:font:freetype_SelectFont Chosen: L"Courier" L"Regular"
(L"/home/focht/projects/wine/mainline-install-x86_64/bin/../share/wine/fonts/coure.fon"/(nil):0)
002a:trace:font:freetype_SelectFont font scale y: 1.000000
002a:trace:font:OpenFontFace
L"/home/focht/projects/wine/mainline-install-x86_64/bin/../share/wine/fonts/coure.fon"/(nil),
0, 13 x 13
002a:trace:font:freetype_SelectFont caching: gdiFont=0x6cbc38  hfont=0x30117
002a:trace:font:add_to_cache font 0x6cbc38
002a:trace:font:freetype_SelectFont 0x30117 L"Courier" 13 aa 5
002a:trace:font:update_font_code_page charset 0 => cp 1252 
....
002a:trace:font:GetTextMetricsW text metrics:
    Weight = 400     FirstChar = 32     AveCharWidth = 8
    Italic =   0     LastChar = 255         MaxCharWidth = 8
    UnderLined = 0     DefaultChar = 128     Overhang = 0
    StruckOut = 0     BreakChar = 32     CharSet = 0
    PitchAndFamily = 30
    --------------------
    InternalLeading = 0
    Ascent = 11
    Descent = 2
    Height = 13
....
002a:trace:font:dump_gdi_font_list ---------- Font Cache ----------
002a:trace:font:dump_gdi_font_list font=0x149348 ref=79 L"System" 16
002a:trace:font:dump_gdi_font_list font=0x6cbc38 ref=0 L"Courier" 13
002a:trace:font:dump_gdi_font_list font=0x158be0 ref=0 L"MS Shell Dlg" -11
002a:trace:font:dump_gdi_font_list font=0x15a190 ref=0 L"MS Shell Dlg" -11
002a:trace:font:dump_gdi_font_list font=0x16b660 ref=0 L"MS Shell Dlg" -11
002a:trace:font:dump_gdi_font_list font=0x17c078 ref=0 L"MS Sans Serif" -11
002a:trace:font:dump_gdi_font_list font=0x6c4b58 ref=0 L"@VL Gothic" -8
002a:trace:font:dump_gdi_font_list font=0x697ff8 ref=0 L"@VL Gothic" 100
002a:trace:font:dump_gdi_font_list font=0x698b88 ref=0 L"@VL Gothic" 100
002a:trace:font:dump_gdi_font_list font=0x6a9c40 ref=0 L"@VL Gothic" 100
002a:trace:font:dump_gdi_font_list font=0x6afc30 ref=0 L"@VL Gothic" 100
002a:trace:font:dump_gdi_font_list font=0x160f50 ref=0 L"" 0
--- snip ---

$ sha1sum fasmw17304.zip 
6973f451b12daab45d8e70612fa8fa8855ff2d75  fasmw17304.zip

$ du -sh fasmw17304.zip 
1.1M    fasmw17304.zip

$ wine --version
wine-3.19-50-g3d5a256797

Regards

*** This bug has been marked as a duplicate of bug 20456 ***

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list