CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    How do I create the font "Wingdings"?

    Hello all,

    I was wondering if anyone could tell me how to create a font of "Wingdings" using "CreateFont" for I am not sure what parameters I should use for the create font that will actually create the font.

    Thanks


  2. #2
    Guest

    Re: How do I create the font "Wingdings"?

    //I would use CreateFontIndirect as follows:

    CFont font;
    LOGFONT logfont;
    memset(&logfont, 0, sizeof( LOGFONT ));

    logfont.lfHeight = -height; //Replace height with height based on mapping mode
    logfont.lfWeight = FW_NORMAL;
    logfont.lfCharSet = SYMBOL_CHARSET;
    logfont.lfOutPrecision = OUT_TT_ONLY_PRECIS;
    logfont.lfQuality = PROOF_QUALITY;
    logfont.lfPitchAndFamily = VARIABLE_PITCH | FF_DECORATIVE;
    strcpy( logfont.lfFaceName, "Wingdings" );

    font.CreateFontIndirect( &logfont );

    //*****
    //If you prefer to use CreateFont, this should do the same thing
    //(replace height with the desired font height):

    font.CreateFont(-height,0,0,0,FW_NORMAL,0,0,0,SYMBOL_CHARSET, 0, 0,PROOF_QUALITY,VARIABLE_PITCH | FF_DECORATIVE, "Wingdings" );



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured