mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
remove boost::algorithm
This commit is contained in:
parent
02a735aa9f
commit
a9cc5b7031
@ -8,15 +8,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <cctype>
|
||||||
#include <boost/algorithm/string.hpp>
|
|
||||||
|
|
||||||
#include "HTMLRenderer.h"
|
#include "HTMLRenderer.h"
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
using boost::algorithm::ifind_first;
|
|
||||||
|
|
||||||
void HTMLRenderer::export_remote_font(const FontInfo & info, const string & suffix, const string & fontfileformat, GfxFont * font)
|
void HTMLRenderer::export_remote_font(const FontInfo & info, const string & suffix, const string & fontfileformat, GfxFont * font)
|
||||||
{
|
{
|
||||||
allcss_fout << "@font-face{font-family:f" << info.id << ";src:url(";
|
allcss_fout << "@font-face{font-family:f" << info.id << ";src:url(";
|
||||||
@ -57,12 +54,16 @@ void HTMLRenderer::export_local_font(const FontInfo & info, GfxFont * font, cons
|
|||||||
allcss_fout << ".f" << info.id << "{";
|
allcss_fout << ".f" << info.id << "{";
|
||||||
allcss_fout << "font-family:" << ((cssfont == "") ? (original_font_name + "," + general_font_family(font)) : cssfont) << ";";
|
allcss_fout << "font-family:" << ((cssfont == "") ? (original_font_name + "," + general_font_family(font)) : cssfont) << ";";
|
||||||
|
|
||||||
if(font->isBold() || ifind_first(original_font_name, "bold"))
|
string fn = original_font_name;
|
||||||
|
for(auto iter = fn.begin(); iter != fn.end(); ++iter)
|
||||||
|
*iter = tolower(*iter);
|
||||||
|
|
||||||
|
if(font->isBold() || (fn.find("bold") != string::npos))
|
||||||
allcss_fout << "font-weight:bold;";
|
allcss_fout << "font-weight:bold;";
|
||||||
|
|
||||||
if(ifind_first(original_font_name, "oblique"))
|
if(fn.find("oblique") != string::npos)
|
||||||
allcss_fout << "font-style:oblique;";
|
allcss_fout << "font-style:oblique;";
|
||||||
else if(font->isItalic() || ifind_first(original_font_name, "italic"))
|
else if(font->isItalic() || (fn.find("italic") != string::npos))
|
||||||
allcss_fout << "font-style:italic;";
|
allcss_fout << "font-style:italic;";
|
||||||
|
|
||||||
allcss_fout << "line-height:" << (info.ascent - info.descent) << ";";
|
allcss_fout << "line-height:" << (info.ascent - info.descent) << ";";
|
||||||
|
@ -7,18 +7,9 @@
|
|||||||
* 2012.08.14
|
* 2012.08.14
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
|
||||||
// for gil bug
|
|
||||||
const int *int_p_NULL = nullptr;
|
|
||||||
#include <boost/gil/gil_all.hpp>
|
|
||||||
#include <boost/gil/extension/io/png_dynamic_io.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "HTMLRenderer.h"
|
#include "HTMLRenderer.h"
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
|
|
||||||
//using namespace boost::gil;
|
|
||||||
|
|
||||||
void HTMLRenderer::drawImage(GfxState * state, Object * ref, Stream * str, int width, int height, GfxImageColorMap * colorMap, GBool interpolate, int *maskColors, GBool inlineImg)
|
void HTMLRenderer::drawImage(GfxState * state, Object * ref, Stream * str, int width, int height, GfxImageColorMap * colorMap, GBool interpolate, int *maskColors, GBool inlineImg)
|
||||||
{
|
{
|
||||||
return OutputDev::drawImage(state,ref,str,width,height,colorMap,interpolate,maskColors,inlineImg);
|
return OutputDev::drawImage(state,ref,str,width,height,colorMap,interpolate,maskColors,inlineImg);
|
||||||
|
Loading…
Reference in New Issue
Block a user