writing-mode properties are deleted during conversions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
New
|
Undecided
|
Unassigned |
Bug Description
This is a fairly common issue when converting Japanese (and presumably Chinese) eBooks using Calibre. This causes books to be displayed horizontally and left to right like a standard English book when it is supposed to be displayed vertically and right to left.
I have been able to reproduce this with several books both converting from azw3 to epub and from epub to azw3. From looking at the stylesheets of the books I've been converting it appears that it is standard for Japanese books to include CSS along the lines of:
.hltr {
-webkit-
-epub-
}
.vrtl {
-webkit-
-epub-
}
Sometimes they are more comprehensive and include more potential writing-mode properties such as:
.hltr {
writing-mode: horizontal-tb;
-webkit-
-moz-
-ms-writing-mode: horizontal-tb;
-o-writing-mode: horizontal-tb;
-epub-
}
.vrtl {
writing-mode: vertical-rl;
-webkit-
-moz-
-ms-writing-mode: vertical-rl;
-o-writing-mode: vertical-rl;
-epub-
}
From my experience "-webkit-
Parsing item/style/
Property: Unknown Property name. [70:5: -webkit-
Property: Unknown Property name. [71:5: -epub-writing-mode]
Property: Unknown Property name. [75:5: -webkit-
Property: Unknown Property name. [76:5: -epub-writing-mode]
The same thing appeared when converting a different book from azw3 to epub. I know that the absence of this property (-webkit-
I will provide the job details log and the input/output file of the book I have tested the most but to be clear this isn't an isolated issue. To the best of my knowledge this affects any book with vertical right to left text and I have seen multiple other people have this same problem.
Calibre Version: 4.10.1 (64bit)
Operating System: Windows 10
Job Details:
Convert book 1 of 1 (STEINS;GATE 蝶翼のダイバージェンス:
Conversion options changed from defaults:
verbose: 2
cover: u'C:\\Users\
debug_pipeline: u'D:\\Documents
no_inline_toc: True
read_
output_profile: u'generic_eink_hd'
Resolved conversion options
calibre version: 4.10.1
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., '\\s*((
'chapter_mark': u'pagebreak',
'comments': None,
'cover': u'C:\\Users\
'debug_pipeline': u'D:\\Documents
'dehyphenate': True,
'delete_
'disable_
'dont_compress': False,
'duplicate_
'embed_all_fonts': False,
'embed_
'enable_
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': u'',
'fix_indents': True,
'font_
'format_
'html_
'input_encoding': None,
'input_profile': <calibre.
'insert_
'insert_
'insert_metadata': False,
'isbn': None,
'italicize_
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_
'max_toc_links': 50,
'minimum_
'mobi_
'no_chapters_
'no_inline_
'no_inline_toc': True,
'output_profile': <calibre.
'page_
'prefer_
'prefer_
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_
'remove_
'remove_
'remove_
'remove_
'renumber_
'replace_
'search_replace': '[]',
'series': None,
'series_index': None,
'share_not_sync': False,
'smarten_
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'start_
'subset_
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'transform_
'unsmarten_
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\
Input debug saved to: D:\Documents\
Parsing all content...
Parsing item/xhtml/
Parsing item/navigation
Parsing item/style/
Parsing item/style/
Parsing item/style/
Property: Unknown Property name. [28:5: word-wrap]
Property: Unknown Property name. [30:5: -webkit-
Property: Unknown Property name. [31:5: -epub-text-
Property: Unknown Property name. [32:5: -webkit-line-break]
Property: Unknown Property name. [33:5: -epub-line-break]
Property: Unknown Property name. [34:5: -webkit-word-break]
Property: Unknown Property name. [35:5: -epub-word-break]
Property: Unknown Property name. [36:5: -webkit-hyphens]
Property: Unknown Property name. [37:5: -epub-hyphens]
Parsing item/style/
Property: Unknown Property name. [70:5: -webkit-
Property: Unknown Property name. [71:5: -epub-writing-mode]
Property: Unknown Property name. [75:5: -webkit-
Property: Unknown Property name. [76:5: -epub-writing-mode]
Property: Unknown Property name. [136:5: -webkit-
Property: Unknown Property name. [137:5: -epub-text-
Property: Unknown Property name. [142:5: -webkit-
Property: Unknown Property name. [143:5: -epub-text-
Property: Unknown Property name. [148:5: -webkit-
Property: Unknown Property name. [149:5: -epub-text-
Property: Unknown Property name. [154:5: -webkit-
Property: Unknown Property name. [155:5: -epub-text-
Property: Unknown Property name. [300:5: -webkit-
Property: Unknown Property name. [301:5: -epub-text-combine]
Property: Unknown Property name. [308:5: -webkit-
Property: Unknown Property name. [309:5: -epub-text-combine]
Property: Unknown Property name. [312:5: -webkit-
Property: Unknown Property name. [313:5: -epub-text-
Property: Unknown Property name. [316:5: -webkit-
Property: Unknown Property name. [317:5: -epub-text-
Property: Unknown Property name. [318:5: -epub-text-
Property: Unknown Property name. [367:5: -webkit-
Property: Unknown Property name. [368:5: -epub-text-
Property: Unknown Property name. [371:5: -webkit-
Property: Unknown Property name. [372:5: -epub-text-
Property: Unknown Property name. [375:5: -webkit-
Property: Unknown Property name. [376:5: -epub-text-
Property: Unknown Property name. [379:5: -webkit-
Property: Unknown Property name. [380:5: -epub-text-
Property: Unknown Property name. [383:5: -webkit-
Property: Unknown Property name. [384:5: -epub-text-
Property: Unknown Property name. [387:5: -webkit-
Property: Unknown Property name. [388:5: -epub-text-
Property: Unknown Property name. [391:5: -webkit-
Property: Unknown Property name. [392:5: -epub-text-
Property: Unknown Property name. [395:5: -webkit-
Property: Unknown Property name. [396:5: -epub-text-
Property: Unknown Property name. [399:5: -webkit-
Property: Unknown Property name. [400:5: -epub-text-
Property: Unknown Property name. [403:5: -webkit-
Property: Unknown Property name. [404:5: -epub-text-
Property: Unknown Property name. [800:5: -webkit-
Property: Unknown Property name. [801:5: -epub-text-
Property: Unknown Property name. [839:5: -webkit-
Property: Unknown Property name. [3078:5: -webkit-line-break]
Property: Unknown Property name. [3079:5: -epub-line-break]
Property: Unknown Property name. [3082:5: -webkit-line-break]
Property: Unknown Property name. [3083:5: -epub-line-break]
Property: Unknown Property name. [3086:5: -webkit-line-break]
Property: Unknown Property name. [3087:5: -epub-line-break]
Property: Unknown Property name. [3090:5: -webkit-line-break]
Property: Unknown Property name. [3091:5: -epub-line-break]
Property: Unknown Property name. [3096:5: -webkit-word-break]
Property: Unknown Property name. [3097:5: -epub-word-break]
Property: Unknown Property name. [3100:5: -webkit-word-break]
Property: Unknown Property name. [3101:5: -epub-word-break]
Property: Unknown Property name. [3104:5: -webkit-word-break]
Property: Unknown Property name. [3105:5: -epub-word-break]
Property: Unknown Property name. [3110:5: word-wrap]
Property: Unknown Property name. [3113:5: word-wrap]
Property: Unknown Property name. [99:5: -webkit-
Parsing item/style/
Property: Unknown Property name. [25:5: -webkit-
Parsing item/style/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Parsing item/xhtml/
Reading TOC from NCX...
Parsed HTML written to: D:\Documents\
Merging user specified metadata...
Detecting structure...
Structured HTML written to: D:\Documents\
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Found 20 items of level: p_4
Found 3435 items of level: p_2
Found 89 items of level: p_3
Found 20 items of level: div_3
Found 38 items of level: div_2
Found 21 items of level: div_1
Ignoring level p_4
Ignoring level div_3
p_2 left margin stats: Counter({u'0': 3435})
p_2 right margin stats: Counter({u'0': 3435})
p_3 left margin stats: Counter({u'0': 89})
p_3 right margin stats: Counter({u'0': 89})
div_2 left margin stats: Counter({u'0': 13})
div_2 right margin stats: Counter({u'0': 13})
div_1 left margin stats: Counter({u'0': 9, u'auto': 2})
div_1 right margin stats: Counter({u'0': 9, u'auto': 2})
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'item/
Trimming u'item/toc.ncx' from manifest
Trimming u'item/js/kobo.js' from manifest
Processed HTML written to: D:\Documents\
Creating AZW3 Output...
Serializing resources...
Splitting markup on page breaks and flow limits, if any...
Creating KF8 output
Generating KF8 markup...
Compressing markup...
Creating indices...
AZW3 output written to C:\Users\