(fontFamily, fontWeight, fontShape)
| 5854 | |
| 5855 | |
| 5856 | var retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) { |
| 5857 | var baseFontName = ""; |
| 5858 | |
| 5859 | switch (fontFamily) { |
| 5860 | case "amsrm": |
| 5861 | baseFontName = "AMS"; |
| 5862 | break; |
| 5863 | |
| 5864 | case "textrm": |
| 5865 | baseFontName = "Main"; |
| 5866 | break; |
| 5867 | |
| 5868 | case "textsf": |
| 5869 | baseFontName = "SansSerif"; |
| 5870 | break; |
| 5871 | |
| 5872 | case "texttt": |
| 5873 | baseFontName = "Typewriter"; |
| 5874 | break; |
| 5875 | |
| 5876 | default: |
| 5877 | baseFontName = fontFamily; |
| 5878 | // use fonts added by a plugin |
| 5879 | } |
| 5880 | |
| 5881 | var fontStylesName; |
| 5882 | |
| 5883 | if (fontWeight === "textbf" && fontShape === "textit") { |
| 5884 | fontStylesName = "BoldItalic"; |
| 5885 | } else if (fontWeight === "textbf") { |
| 5886 | fontStylesName = "Bold"; |
| 5887 | } else if (fontWeight === "textit") { |
| 5888 | fontStylesName = "Italic"; |
| 5889 | } else { |
| 5890 | fontStylesName = "Regular"; |
| 5891 | } |
| 5892 | |
| 5893 | return baseFontName + "-" + fontStylesName; |
| 5894 | }; |
| 5895 | /** |
| 5896 | * Maps TeX font commands to objects containing: |
| 5897 | * - variant: string used for "mathvariant" attribute in buildMathML.js |
no outgoing calls
no test coverage detected