public static FontWeight GetFontWeight(PrintElementFontWeight weight) { switch (weight) { case PrintElementFontWeight.Normal: return(FontWeights.Normal); case PrintElementFontWeight.Medium: return(FontWeights.Medium); case PrintElementFontWeight.Bold: return(FontWeights.Bold); case PrintElementFontWeight.SemiBold: return(FontWeights.SemiBold); case PrintElementFontWeight.ExtraBold: return(FontWeights.ExtraBold); case PrintElementFontWeight.UltraBold: return(FontWeights.UltraBold); case PrintElementFontWeight.Light: return(FontWeights.Light); case PrintElementFontWeight.ExtraLight: return(FontWeights.ExtraLight); case PrintElementFontWeight.UltraLight: return(FontWeights.UltraLight); } return(default(FontWeight)); }
public static string GetFontWeight(PrintElementFontWeight weight) { switch (weight) { case PrintElementFontWeight.UltraLight: return("100"); case PrintElementFontWeight.ExtraLight: return("200"); case PrintElementFontWeight.Light: return("300"); case PrintElementFontWeight.Normal: return("400"); case PrintElementFontWeight.Medium: return("500"); case PrintElementFontWeight.SemiBold: return("600"); case PrintElementFontWeight.Bold: return("700"); case PrintElementFontWeight.ExtraBold: return("800"); case PrintElementFontWeight.UltraBold: return("900"); } return(null); }