1. In my xml file I have these definitons:

     <!-- set font for use in displays -->
     <Font name="THRESH_Font" font="Fonts\FRIZQT__.TTF" virtual="true">
     </Font>
    
     -- class dependent data display #0
     <FontString name="$Parent_Pclassdata0" inherits="THRESH_Font" text="">
     ... set anchors, etc. here ... omitted
     </FontString>
    

    In my lua file when I do this: THRESH_Frame_Pclassdata0:SetTextHeight(28); It works, though as you say in the book, the font is jaggy looking.

    But when I do this instead: isValid = THRESH_Font:SetFont("Fonts\\FRIZQT__.TTF", 28, "OUTLINE") The font size goes back to the default size. I tested isValid and its not nil ... and when I do it this way, the outline appears. It's just the size that doesn't seem to change.

    I also tried this:

     <Font name="THRESH_Font" font="Fonts\FRIZQT__.TTF" virtual="true">
       <FontHeight>
         <AbsValue val="28"/>
       </FontHeight>
     </Font>
    

    I found the FontHeight descriptor in Blizzard's files. But this also does not change the size.

    What am I missing? Is there something in the definition of the fontstring that restricts the height?

    Thanks for any help you can give me. Love your book BTW.

  2. I'm not sure off the top of my head. I'd look at how the default fonts are defined (Fonts.xml and FontStyles.xml) and see if you can work anything out there. I'll try to look at it sometime tomorrow, but I won't have much of a chance to play until then.

  3. Thanks ... no hurry ... I've been wrestling with this for a week or so now, but it's not a crucial problem.

    Fonts.xml does it this way:

     <Font name="SystemFont_Tiny" font="Fonts\FRIZQT__.TTF" virtual="true">
        <FontHeight>
          <AbsValue val="9"/>
        </FontHeight>
     </Font>
    

    If I define a font and leave out the FontHeight, I get a error: Font not set. A SetFont instruction in lua takes care of that.

    However, neither of them seems to affect the size of the font on the screen.

    The FontStyles file doesn't set any sizes ... mostly just colors.

  4. In fonts.xml I found:

    <Font name="NumberFont_Outline_Huge" font="Fonts\skurri.ttf" outline="NORMAL" virtual="true">
        <FontHeight>
            <AbsValue val="30"/>
        </FontHeight>
    </Font>
    

    This is used in fontstyles.xml:

    <Font name="NumberFontNormalHuge" inherits="NumberFont_Outline_Huge" virtual="true">
        <Color r="1.0" g="1.0" b="1.0"/>
    </Font>
    

    which should produce a font with height 30.

    I use it to define a fontstring:

     <FontString name="$Parent_Pclassdata0" inherits="NumberFontNormalHuge" text="">
     </FontString>
    

    but this produces text on the screen at roughly size 18 (slightly bigger than size 16 in the chat window).

    If I add this in lua:

    THRESH_Frame_Pclassdata0:SetTextHeight(28);

    the text expands to something less than double in size, but is jaggy.

    The font is used in Blizzard twice ... in

     <FontString name="PlayerHitIndicator" hidden="true" inherits="NumberFontNormalHuge">
     ... anchor specification here
     </FontString>
    

    which is on PlayerFrame.

    and in a similar fontstring named PetHitIndicator which is on PetFrame. I'm still looking to see them in action.

  5. OK - found the problem.

    In Video Preferences I had the UI scale on. I have it set to .8 or so, and this scales the interface up to about four times it's unscaled size.

    It looks like the font I defined is the right size for the unscaled screen, but it is not scaling up. On the other hand the SetTextHeight results are scaled up.

    I'm not sure if there's a way to fix this, and the jaggy TextHeight version does well enough for my needs right now, so I have time to look into how the scaling works.

    Thanks for taking a look at this. If you have any insight into the scaling problem, that would be good news.

    -- RWD

  6. OK - found the problem.

    In Video Preferences I had the UI scale on. I have it set to .8 or so, and this scales the interface up to about four times it's unscaled size.

    This actually scales the interface DOWN, so I'm a bit confused.

    It looks like the font I defined is the right size for the unscaled screen, but it is not scaling up. On the other hand the SetTextHeight results are scaled up.

    Its possible that the AbsValue method is scaling independent, while the other version changes depending on the scale.

    I'm not sure if there's a way to fix this, and the jaggy TextHeight version does well enough for my needs right now, so I have time to look into how the scaling works.

    Thanks for taking a look at this. If you have any insight into the scaling problem, that would be good news.

    Not sure if my comments helped at all.

  7. Sorry ... my confusion ... the interface elements get smaller, the characters and scenery stay the same size.

    Blizzard uses AbsValue to set their font sizes, and theirs scale.

    After testing it ... I have a frame that scales fine, the frame contains a Texture that scales fine. And the fontstring whose size is set by TextHeight scales fine.

    The only thing that doesn't seem to scale is the fontstring when I try to set it's size with SetFont. It's puzzling and some day when I have time I'll come back to it.

    Actually, the fact that you didn't immediately say, "Ah ha, you're doing such and such" is very useful. Besides, I read through the forum and learned a few new WoW programming tricks. Plus I learned that there's a second edition of your book ... which I now own. Take care.