#include <mil.h>
int MosMain(void)
{
MIL_ID MilApplication,
MilSystem,
MilDisplay,
MilImage,
MilGraphicContextId;
MappAllocDefault(M_DEFAULT, &MilApplication, &MilSystem,
&MilDisplay, M_NULL, &MilImage);
MgraAlloc(MilSystem, &MilGraphicContextId);
MgraColor(MilGraphicContextId, 0xF0);
MgraFont(MilGraphicContextId, M_FONT_DEFAULT_LARGE);
MgraText(MilGraphicContextId, MilImage, 160L, 20L, MIL_TEXT(" Welcome to MIL !!! "));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 12);
MgraFont(MilGraphicContextId, MIL_FONT_NAME(M_FONT_DEFAULT_TTF));
MgraText(MilGraphicContextId, MilImage, 40L, 80L, MIL_TEXT("English"));
MappControl(M_DEFAULT, M_ERROR, M_PRINT_DISABLE);
MgraControl(MilGraphicContextId,M_FONT_SIZE, 16);
MgraFont(MilGraphicContextId,
MIL_FONT_NAME(M_FONT_DEFAULT_TTF MIL_TEXT(":Bold")));
MgraText(MilGraphicContextId, MilImage, 40L, 140L, MIL_TEXT("Français"));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 24);
MgraFont(MilGraphicContextId, MIL_FONT_NAME(M_FONT_DEFAULT_TTF MIL_TEXT(":Italic")));
MgraText(MilGraphicContextId, MilImage, 40L, 220L, MIL_TEXT("Italiano"));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 30);
MgraFont(MilGraphicContextId,
MIL_FONT_NAME(M_FONT_DEFAULT_TTF MIL_TEXT(":Bold:Italic")));
MgraText(MilGraphicContextId, MilImage, 40L ,300L, MIL_TEXT("Deutsch"));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 36);
#if M_MIL_USE_LINUX
MgraFont(MilGraphicContextId, MIL_FONT_NAME(MIL_TEXT("Monospace")));
#else
MgraFont(MilGraphicContextId, MIL_FONT_NAME(MIL_TEXT("Courier New")));
#endif
MgraText(MilGraphicContextId, MilImage, 40L ,380L, MIL_TEXT("Español"));
#if M_MIL_USE_TTF_UNICODE
MgraFont(MilGraphicContextId, MIL_FONT_NAME(M_FONT_DEFAULT_TTF));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 12);
MgraText(MilGraphicContextId, MilImage, 400L, 80L, MIL_TEXT("ελληνιδ"));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 16);
MgraText(MilGraphicContextId, MilImage, 400L, 140L, MIL_TEXT("日本語"));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 24);
MgraText(MilGraphicContextId, MilImage, 400L, 220L, MIL_TEXT("한국어"));
MgraControl(MilGraphicContextId,M_TEXT_DIRECTION, M_RIGHT_TO_LEFT);
MgraControl(MilGraphicContextId,M_FONT_SIZE, 30);
MgraText(MilGraphicContextId, MilImage, 400L, 320L, MIL_TEXT("עברית"));
MgraControl(MilGraphicContextId,M_FONT_SIZE, 36);
MgraText(MilGraphicContextId, MilImage, 400L, 380L, MIL_TEXT("ﻋﺮﺑﻲ"));
#endif
MosPrintf(MIL_TEXT("\nINTERNATIONAL TEXT ANNOTATION:\n"));
MosPrintf(MIL_TEXT("------------------------------\n"));
MosPrintf(MIL_TEXT("\nThis example demonstrates the support"));
MosPrintf(MIL_TEXT(" of TrueType fonts by MgraText.\n\n"));
if(MappGetError(M_GLOBAL + M_SYNCHRONOUS, 0) != M_NULL_ERROR)
MosPrintf(MIL_TEXT("Note: Some Unicode fonts are not available\n\n"));
MosPrintf(MIL_TEXT("Press <Enter> to end.\n"));
MosGetch();
MgraFree(MilGraphicContextId);
MappFreeDefault(MilApplication, MilSystem, MilDisplay, M_NULL, MilImage);
return 0;
}