int CurrentCyrillicFontFamily(void) /****************************************************************************** purpose: returns the cyrillic font that should be used ... if the current font is cyrillic font then -1 is returned ******************************************************************************/ { int num,i; char *font_type; ConfigEntryT **font_handle; num = CurrentFontFamily(); /* obtain name and type of current active font */ font_handle = CfgStartIterate(FONT_A); for (i=0; i<=num-3; i++) font_handle = CfgNext(FONT_A, font_handle); font_type = (char *) (*font_handle)->TexCommand; diagnostics(6,"CurrentCyrillicFontFamily current active font type =<%s>", font_type); if (strncmp(font_type, "Cyrillic", 8)==0) return -1; if (strcmp(font_type, "Slanted")==0) return TexFontNumber("Cyrillic Slanted"); if (strcmp(font_type, "Sans Serif")==0) return TexFontNumber("Cyrillic Sans Serif"); if (strcmp(font_type, "Typewriter")==0) return TexFontNumber("Cyrillic Typewriter"); return TexFontNumber("Cyrillic Roman"); }
void CmdTextNormal(int code) /**************************************************************************** purpose: handle \textnormal{text} {\normalfont ...} commands F_TEXT_NORMAL for \normalfont ... F_TEXT_NORMAL_1 F_TEXT_NORMAL_2 for \textnormal{...} F_TEXT_NORMAL_3 for \begin{normalfont} ... \end{normalfont} ******************************************************************************/ { int true_code = code & ~ON; diagnostics(5, "CmdTextNormal (before) depth=%d, family=%d, size=%d, shape=%d, series=%d", FontInfoDepth, RtfFontInfo[FontInfoDepth].family, RtfFontInfo[FontInfoDepth].size, RtfFontInfo[FontInfoDepth].shape, RtfFontInfo[FontInfoDepth].series); if (true_code == F_TEXT_NORMAL_3 && !(code & ON)) return; if (getTexMode() == MODE_VERTICAL) changeTexMode(MODE_HORIZONTAL); if (code == F_TEXT_NORMAL_2) fprintRTF("{"); if (CurrentFontShape() != DefaultFontShape()) CmdFontShape(DefaultFontShape()); if (CurrentFontSeries() != DefaultFontSeries()) CmdFontSeries(DefaultFontSeries()); if (CurrentFontSize() != DefaultFontSize()) CmdFontSize(DefaultFontSize()); if (CurrentFontFamily() != DefaultFontFamily()) CmdFontFamily(DefaultFontFamily()); if (code == F_TEXT_NORMAL_2) { char *s; s = getBraceParam(); ConvertString(s); free(s); fprintRTF("}"); } diagnostics(5, "CmdTextNormal (after) depth=%d, family=%d, size=%d, shape=%d, series=%d", FontInfoDepth, RtfFontInfo[FontInfoDepth].family, RtfFontInfo[FontInfoDepth].size, RtfFontInfo[FontInfoDepth].shape, RtfFontInfo[FontInfoDepth].series); }