mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
workaround of soft hyphen
This commit is contained in:
parent
ebc32a9fb1
commit
84a2490200
@ -1,4 +1,4 @@
|
|||||||
/* vim: filetype=cpp : */
|
/* vim: set filetype=cpp : */
|
||||||
/*
|
/*
|
||||||
* css_const.h
|
* css_const.h
|
||||||
*
|
*
|
||||||
|
@ -17,7 +17,12 @@ using std::cerr;
|
|||||||
using std::endl;
|
using std::endl;
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
|
|
||||||
/* Test legal for HTML */
|
/*
|
||||||
|
* Test legal for HTML
|
||||||
|
*
|
||||||
|
* A legal unicode character should be accepted by browsers, and displayed correctly.
|
||||||
|
* This function is not complete, just to be improved.
|
||||||
|
*/
|
||||||
bool isLegalUnicode(Unicode u)
|
bool isLegalUnicode(Unicode u)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -47,6 +52,13 @@ bool isLegalUnicode(Unicode u)
|
|||||||
if((u >= 127) && (u <= 160))
|
if((u >= 127) && (u <= 160))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 173, or 0xad, is the soft hyphen
|
||||||
|
* which can be ignored by the browser in the middle of a line
|
||||||
|
*/
|
||||||
|
if(u == 173)
|
||||||
|
return false;
|
||||||
|
|
||||||
if((u >= 0xd800) && (u <= 0xdfff))
|
if((u >= 0xd800) && (u <= 0xdfff))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user