Сut letters


11-08-2015 17:57:11


I made the font for MyGUI, but the letters in it are cut off from the left side.
How to fix it?

Here's my font
<Resource type="ResourceTrueTypeFont" name="KomikaAxis42">
<Property key="Source" value="KomikaAxis.ttf"/>
<Property key="Size" value="42"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="SpaceWidth" value="7"/>
<Property key="TabWidth" value="8"/>
<Property key="CursorWidth" value="2"/>
<Property key="Distance" value="6"/>
<Property key="OffsetHeight" value="4"/>
<Code range="48 125"/>

Here's the problem


11-08-2015 23:09:18

I just opened your font in font editor and it looks correct. What version of MyGUI do you use?
I used font from this site: http://www.dafont.com/komika-axis.font If you have different font file that might be a problem as well.


12-08-2015 09:02:12

Yes, this font. Version of MyGUI is 3.2.0.
Although FontViewer font is displayed correctly.

Just update to 3.2.2. All works fine!
But if try to initialize Platform without viewports my app crashed here:

void OgreRenderManager::setRenderWindow(Ogre::RenderWindow* _window)
// отписываемся
if (mWindow != nullptr)
Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this);
mWindow = nullptr;

mWindow = _window;

if (mWindow != nullptr)
Ogre::WindowEventUtilities::addWindowEventListener(mWindow, this);

if (mWindow->getNumViewports() <= mActiveViewport &&
!mWindow->getViewport(mActiveViewport)->getOverlaysEnabled()) //crashed here!
MYGUI_PLATFORM_LOG(Warning, "Overlays are disabled. MyGUI won't render in selected viewport.");


So I added one check for it:
if (mWindow->getNumViewports()>0 && //Is there at least one viewport?
mWindow->getNumViewports() <= mActiveViewport &&
MYGUI_PLATFORM_LOG(Warning, "Overlays are disabled. MyGUI won't render in selected viewport.");

Вроде работает :)