Request to flip font vertically with getVectorFont()

Can we request an option to flip the font vertically in the parameters of getVectorFont()?   This would avoid having upside down text when drawRadialText() is used to draw on the lower half circle of watchfaces.

  • Do you mean like this? You do it in the call to drawRadialText.

    Here's the code:

                //top
                dc.drawRadialText(width/2, height/2, fontS, "1234", Graphics.TEXT_JUSTIFY_CENTER, 90, width/2-(height*.15), Graphics.RADIAL_TEXT_DIRECTION_CLOCKWISE);
                dc.drawRadialText(width/2, height/2, fontS, "5678", Graphics.TEXT_JUSTIFY_CENTER, 90, width/2-(height*.15)-20, Graphics.RADIAL_TEXT_DIRECTION_COUNTER_CLOCKWISE);    
                //bottom
                dc.drawRadialText(width/2, height/2, fontS, "1234", Graphics.TEXT_JUSTIFY_CENTER, 270, width/2-(height*.15), Graphics.RADIAL_TEXT_DIRECTION_CLOCKWISE);
                dc.drawRadialText(width/2, height/2, fontS, "5678", Graphics.TEXT_JUSTIFY_CENTER, 270, width/2-(height*.15)-20, Graphics.RADIAL_TEXT_DIRECTION_COUNTER_CLOCKWISE);
                //right
                dc.drawRadialText(width/2, height/2, fontS, "1234", Graphics.TEXT_JUSTIFY_CENTER, 0, width/2-(height*.15), Graphics.RADIAL_TEXT_DIRECTION_CLOCKWISE);
                dc.drawRadialText(width/2, height/2, fontS, "5678", Graphics.TEXT_JUSTIFY_CENTER, 0, width/2-(height*.15)-20, Graphics.RADIAL_TEXT_DIRECTION_COUNTER_CLOCKWISE);
                //left
                dc.drawRadialText(width/2, height/2, fontS, "1234", Graphics.TEXT_JUSTIFY_CENTER, 180, width/2-(height*.15), Graphics.RADIAL_TEXT_DIRECTION_CLOCKWISE);
                dc.drawRadialText(width/2, height/2, fontS, "5678", Graphics.TEXT_JUSTIFY_CENTER, 180, width/2-(height*.15)-20, Graphics.RADIAL_TEXT_DIRECTION_COUNTER_CLOCKWISE);
                

    see RADIAL_TEXT_DIRECTION_*

  • Can anyone provide an example for "font"?  I know it is supposed to contain the font face and the size... I just can't get the syntax correct...

     dc.drawRadialText(x/2, y/2, {:face=>"RobotoCondensedRegular",:size=>29} , "Hello", Graphics.TEXT_JUSTIFY_LEFT, 145, x/2-10, Graphics.RADIAL_TEXT_DIRECTION_CLOCKWISE);
    It keeps giving me symbol not found and I believe it has to do with the way I set up the "font" parameter. Thx
  • It looks like you skipped doing getVectorFont, and are trying to use it's parameters in drawRadialText.

    You need something like 

    vectorF=Graphics.getVectorFont({:face=>["RobotoCondensedRegular","RobotoRegular"], :size=>vectorH});
    He's a sample where vector fonts are used for the date if they are available, and they are curved.  Otherwise a standard font is used
  • You are correct...I figured it out last night. Thanks Jim!!