Changeset 1674 for trunk/src


Ignore:
Timestamp:
Nov 9, 1999, 8:52:33 PM (26 years ago)
Author:
phaller
Message:

Fix: CreateFontIndirect debug info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/font.cpp

    r1388 r1674  
    1 /* $Id: font.cpp,v 1.1 1999-10-20 22:36:53 sandervl Exp $ */
     1/* $Id: font.cpp,v 1.2 1999-11-09 19:52:33 phaller Exp $ */
    22
    33/*
     
    1313 *
    1414 */
     15
     16#include <odin.h>
     17#include <odinwrap.h>
     18#include <os2sel.h>
     19
    1520#include <os2win.h>
    1621#include <stdlib.h>
     
    2025#include "unicode.h"
    2126#include <vmutex.h>
     27
     28
     29ODINDEBUGCHANNEL(GDI32-FONT)
     30
    2231
    2332VMutex mutexProcWinA;
     
    7988//******************************************************************************
    8089//******************************************************************************
    81 HFONT WIN32API CreateFontIndirectW(const LOGFONTW *lplf)
    82 {
    83  LOGFONTA afont;
    84  HFONT    hfont;
    85 
    86     memcpy(&afont, lplf, ((int)&afont.lfFaceName - (int)&afont));
    87     memcpy(&afont, lplf, ((int)&afont.lfFaceName - (int)&afont));
    88     UnicodeToAsciiN((WCHAR *)lplf->lfFaceName, afont.lfFaceName, LF_FACESIZE-1);
    89 
    90     hfont = O32_CreateFontIndirect(&afont);
    91     dprintf(("GDI32: CreateFontIndirectW\n"));
    92     dprintf(("GDI32: lfHeight        = %d\n", lplf->lfHeight));
    93     dprintf(("GDI32: lfWidth          = %d\n", lplf->lfWidth));
    94     dprintf(("GDI32: lfHeight        = %d\n", afont.lfHeight));
    95     dprintf(("GDI32: lfWidth          = %d\n", afont.lfWidth));
    96     dprintf(("GDI32: lfEscapement    = %d\n", afont.lfEscapement));
    97     dprintf(("GDI32: lfOrientation   = %d\n", afont.lfOrientation));
    98     dprintf(("GDI32: lfWeight        = %d\n", afont.lfWeight));
    99     dprintf(("GDI32: lfItalic        = %d\n", afont.lfItalic));
    100     dprintf(("GDI32: lfUnderline     = %d\n", afont.lfUnderline));
    101     dprintf(("GDI32: lfStrikeOut     = %d\n", afont.lfStrikeOut));
    102     dprintf(("GDI32: lfCharSet       = %X\n", afont.lfCharSet));
    103     dprintf(("GDI32: lfOutPrecision  = %X\n", afont.lfOutPrecision));
    104     dprintf(("GDI32: lfClipPrecision = %X\n", afont.lfClipPrecision));
    105     dprintf(("GDI32: lfQuality       = %X\n", afont.lfQuality));
    106     dprintf(("GDI32: lfPitchAndFamily= %X\n", afont.lfPitchAndFamily));
    107     dprintf(("GDI32: lfFaceName      = %s\n", afont.lfFaceName));
    108     dprintf(("GDI32: CreateFontIndirectW %s returned %X\n", afont.lfFaceName, hfont));
    109 
    110     return(hfont);
     90ODINFUNCTION1(HFONT, CreateFontIndirectW,const LOGFONTW *, lplf)
     91{
     92  LOGFONTA afont;
     93  HFONT    hfont;
     94
     95  //memcpy(&afont, lplf, ((int)&afont.lfFaceName - (int)&afont));
     96  memcpy(&afont, lplf, sizeof(LOGFONTA));
     97  UnicodeToAsciiN((WCHAR *)lplf->lfFaceName, afont.lfFaceName, LF_FACESIZE-1);
     98  hfont = CreateFontIndirectA(&afont);
     99  return(hfont);
    111100}
    112101//******************************************************************************
     
    119108//******************************************************************************
    120109//******************************************************************************
    121 int  EXPENTRY_O32 EnumFontProcW(LPENUMLOGFONTA lpLogFont, LPNEWTEXTMETRICA lpTextM, 
     110int  EXPENTRY_O32 EnumFontProcW(LPENUMLOGFONTA lpLogFont, LPNEWTEXTMETRICA lpTextM,
    122111                                DWORD arg3, LPARAM arg4)
    123112{
Note: See TracChangeset for help on using the changeset viewer.