WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Subscript (https://forum.worldviz.com/showthread.php?t=3703)

renama 04-10-2011 06:31 PM

Subscript
 
We tried to use C₁C₂, but subscript 1,2 does not show in Vizard editor, (superscipt ², ³ works fine). We need to use subscript a lot in our math teaching software developed with Vizard. Right now we can do is to create a new text 1 or 2, reduce the scale and put it into the position beside the C. But this causes much inconvienient to us(many times to try the position). Could anybody tell us how to solve thhis problem? Thanks in advance.

farshizzo 04-11-2011 09:46 AM

I'm not sure why it's not showing up in the editor. I'll look into that.

To display subscript characters in the text object, you will need to change the font to one that supports it. For example, Cambria Math seems to support subscript:
Code:

import viz
viz.go()

text = viz.addText('C₁C₂C²C³',parent=viz.ORTHO,fontSize=30)
text.font('cambria.ttc')
viz.link(viz.CenterCenter,text)

The Cambria Math font is included with Windows Vista and up. There are other free math fonts available, like Asana-Math.

renama 04-12-2011 03:53 PM

Thanks.The Cambria Math is not the perfect font for us to display the message, but at least we have one to use. Just wonderring why so many fonts support supscript, but not subscript.


All times are GMT -7. The time now is 12:41 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC