mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
				synced 2025-10-30 18:17:50 +00:00 
			
		
		
		
	Cell: fix wrong condition when checking for font styles
This commit is contained in:
		| @@ -10,7 +10,7 @@ namespace PDF { | ||||
|  | ||||
|  | ||||
| Cell::Cell(const AttributedString& content, const std::string& name, FontMapPtr pFontMap): | ||||
| 	_content(content),  | ||||
| 	_content(content), | ||||
| 	_name(name), | ||||
| 	_outline(OUTLINE_NONE), | ||||
| 	_lineWidth(1.0f), | ||||
| @@ -23,10 +23,10 @@ Cell::Cell(const AttributedString& content, const std::string& name, FontMapPtr | ||||
|  | ||||
|  | ||||
| Cell::Cell(const AttributedString& content, FontMapPtr pFontMap, const std::string& encoding, bool trueType, int widthAsPct): | ||||
| 	_content(content),  | ||||
| 	_content(content), | ||||
| 	_outline(OUTLINE_NONE), | ||||
| 	_lineWidth(1.0f), | ||||
| 	_encoding(encoding),  | ||||
| 	_encoding(encoding), | ||||
| 	_trueType(trueType), | ||||
| 	_widthAsPct(widthAsPct) | ||||
| { | ||||
| @@ -104,13 +104,13 @@ void Cell::draw(Page& page, float x, float y, float width, float height) | ||||
| 				else if (_trueType) page.setTTFont((*_pFontMap)[AttributedString::STYLE_PLAIN], fontSize, _encoding); | ||||
| 				else                page.setFont((*_pFontMap)[AttributedString::STYLE_PLAIN], fontSize, _encoding); | ||||
| 			} | ||||
| 			else if (fontStyle | AttributedString::STYLE_BOLD) | ||||
| 			else if (fontStyle & AttributedString::STYLE_BOLD) | ||||
| 			{ | ||||
| 				if (!_pFontMap)     page.setFont("Helvetica-Bold", fontSize); | ||||
| 				else if (_trueType) page.setTTFont((*_pFontMap)[AttributedString::STYLE_BOLD], fontSize, _encoding); | ||||
| 				else                page.setFont((*_pFontMap)[AttributedString::STYLE_BOLD], fontSize, _encoding); | ||||
| 			} | ||||
| 			else if (fontStyle | AttributedString::STYLE_ITALIC) | ||||
| 			else if (fontStyle & AttributedString::STYLE_ITALIC) | ||||
| 			{ | ||||
| 				if (!_pFontMap)     page.setFont("Helvetica-Oblique", fontSize); | ||||
| 				else if (_trueType) page.setTTFont((*_pFontMap)[AttributedString::STYLE_ITALIC], fontSize, _encoding); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Günter Obiltschnig
					Günter Obiltschnig