当前位置: 首页>>代码示例>>C#>>正文


C# StyleInfo.IsFontBold方法代码示例

本文整理汇总了C#中fyiReporting.RDL.StyleInfo.IsFontBold方法的典型用法代码示例。如果您正苦于以下问题:C# StyleInfo.IsFontBold方法的具体用法?C# StyleInfo.IsFontBold怎么用?C# StyleInfo.IsFontBold使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fyiReporting.RDL.StyleInfo的用法示例。


在下文中一共展示了StyleInfo.IsFontBold方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetPdfFont

		internal string GetPdfFont(StyleInfo si)
		{
			string face = FontNameNormalize(si.FontFamily);
			if (face == "Times-Roman" &&
				(si.IsFontBold() || si.FontStyle == FontStyleEnum.Italic))
				face = "Times";

			if (si.IsFontBold() && 
				si.FontStyle == FontStyleEnum.Italic)	// bold and italic?
				face = face + "-BoldOblique";
			else if (si.IsFontBold())			// just bold?
				face = face + "-Bold";
			else if (si.FontStyle == FontStyleEnum.Italic)
				face = face + "-Oblique";

			return GetPdfFont(face);
		}
开发者ID:romeroyonatan,项目名称:opendental,代码行数:17,代码来源:PdfFont.cs

示例2: iAddText

        /// <summary>
        /// Page Text element at the X Y position; multiple lines handled
        /// </summary>
        /// <returns></returns>
		private void iAddText (float x, float y, float height, float width, string[] sa,
			StyleInfo si, PdfFonts fonts, float[] tw, bool bWrap, string url, bool bNoClip, string tooltip)
		{
			int platform = (int)Environment.OSVersion.Platform;
			int version = (int)Environment.OSVersion.Version.Major;

			BaseFont bf;
			string face = iFontNameNormalize (si.FontFamily);
			string fontname = "";
			bool fonttype1 = true;
			var folder = FontFolder; //Call to determine folder and set value of dejavuFonts;
			if (face == "Times-Roman") {
				if (si.IsFontBold () && si.FontStyle == FontStyleEnum.Italic) {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "TimesNewRomanPS-BoldItalicMT";
						fontname = "Times New Roman Bold Italic.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Serif Condensed Bold Italic" : "Times-BoldItalic";
						fontname = (dejavuFonts ? "DejaVuSerifCondensed-BoldItalic.ttf" : "timesbi.ttf");
					}
				} else if (si.IsFontBold ()) {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "TimesNewRomanPS-BoldMT";
						fontname = "Times New Roman Bold.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Serif Condensed Bold" : "Times-Bold";
						fontname = (dejavuFonts ? "DejaVuSerifCondensed-Bold.ttf" : "timesbd.ttf");
					}
				} else if (si.FontStyle == FontStyleEnum.Italic) {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "TimesNewRomanPS-ItalicMT";
						fontname = "Times New Roman Italic.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Serif Condensed Italic" : "Times-Italic";
						fontname = (dejavuFonts ? "DejaVuSerifCondensed-Italic.ttf" : "timesi.ttf");
					}
				} else {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "TimesNewRomanPSMT";
						fontname = "Times New Roman.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Serif Condensed" : face;
						fontname = (dejavuFonts ? "DejaVuSerifCondensed.ttf" : "times.ttf");
					}
				}
				fonttype1 = false;
			} else if (face == "Arial") {
				if (si.IsFontBold () && si.FontStyle == FontStyleEnum.Italic) {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "Arial BoldItalicMT";
						fontname = "Arial Bold Italic.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Sans Condensed Bold Oblique" : "Arial-BoldItalic";
						fontname = (dejavuFonts ? "DejaVuSansCondensed-BoldOblique.ttf" : "arialbi.ttf");
					}
				} else if (si.IsFontBold ()) {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "Arial-BoldMT";
						fontname = "Arial Bold.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Sans Condensed Bold" : "Arial-Bold";
						fontname = (dejavuFonts ? "DejaVuSansCondensed-Bold.ttf" : "arialbd.ttf");
					}
				} else if (si.FontStyle == FontStyleEnum.Italic) {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "Arial-ItalicMT";
						fontname = "Arial Italic.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Sans Condensed Oblique" : "Arial-Italic";
						fontname = (dejavuFonts ? "DejaVuSansCondensed-Oblique.ttf" : "ariali.ttf");
					}
				} else {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "ArialMT";
						fontname = "Arial.ttf";
					} else {
						face = dejavuFonts ? "DejaVu Sans Condensed" : face;
						fontname = (dejavuFonts ? "DejaVuSansCondensed.ttf" : "arial.ttf");
					}
				}
				fonttype1 = false;
			} else if (face == "Courier New") {
				if (si.IsFontBold () && si.FontStyle == FontStyleEnum.Italic) {
					//OSX
					if ((platform == 4 || platform == 6 || platform == 128) && version > 8) {
						face = "CourierNewPS-BoldItalicMT";
						fontname = "Courier New Bold Italic.ttf";
					} else {
//.........这里部分代码省略.........
开发者ID:myersBR,项目名称:My-FyiReporting,代码行数:101,代码来源:RenderPdf.cs


注:本文中的fyiReporting.RDL.StyleInfo.IsFontBold方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。