sourcefile=libnickel.so.1.0.0_plus
targetfile=..\3.0.0_plus_target\usr\local\Kobo\libnickel.so.1.0.0


//---- CONTENT
// -------------------------------------------------- Footer and Header
// -------------------------------------------------- Library
// -------------------------------------------------- Book Search (not yet)
// -------------------------------------------------- Dictionary
// -------------------------------------------------- Annotations (only details view)
// -------------------------------------------------- Localisation (not)
// -------------------------------------------------- Advanced Font Control (from Metazoa)


// -------------------------------------------------- Footer and Header

<patch>
name=ReadingFooter
enabled=true
action=replace_xor_D3
position=13BE688
oldpart=ReadingFooter {\n\tmin-height: 70px;\n\tmax-height: 70px;\n\tqproperty-footerMargin: 40;\n}\n\n
oldpart=ReadingFooter[deviceCodeName=\"kraken\"], \nReadingFooter[deviceCodeName=\"phoenix\"] {\n\tmin-height: 82px;\n\tmax-height: 82px;\n\tqproperty-footerMargin: 15;\n}\n\n
oldpart=ReadingFooter[deviceCodeName=\"dragon\"] {\n\tmin-height: 120px;\n\tmax-height: 120px;\n\tqproperty-footerMargin: 20;\n}\n\n
oldpart=* {\n\tfont-size: 16px;\n}\n\n
oldpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"] {\n\tfont-size: 20px;\n}\n\n
oldpart=[deviceCodeName=\"dragon\"] {\n\tfont-size: 26px;\n}\n\n
oldpart=[localeName=\"ja_JP\"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}
newpart=ReadingFooter {\n\tmin-height: 70px;\n\tmax-height: 70px;\n\tqproperty-footerMargin: 40;\n}\n\n
newpart=ReadingFooter[deviceCodeName=\"kraken\"], \nReadingFooter[deviceCodeName=\"phoenix\"] {\n\tmin-height: 82px;\n\tmax-height: 82px;\n\tqproperty-footerMargin: 15;\n}\n\n
newpart=ReadingFooter[deviceCodeName=\"dragon\"] {\n\tmin-height: 120px;\n\tmax-height: 120px;\n\tqproperty-footerMargin: 20;\n}\n\n
newpart=* {\n\tfont-size: 28px;\n}\n\n
newpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"] {\n\tfont-size: 32px;\n}\n\n
newpart=[deviceCodeName=\"dragon\"] {\n\tfont-size: 38px;\n}\n\n
newpart=[localeName=\"ja_JP\"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}
combineparts
</patch>

<patch>
name=Header
enabled=true
action=replace_xor_DF
position=13CEEB0
oldpart=* {\nfont-size: 16px;\nfont-family: Avenir;\nbackground-color: transparent;\npadding-top:3px;\n}\n\n
oldpart=[localeName=\"ja_JP\"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\nqproperty-leading: 0;\n}
newpart=* {\nfont-size: 28px;\nfont-family: Avenir;\nbackground-color: transparent;\npadding-top:3px;\n}\n\n
newpart=[localeName=\"ja_JP\"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\nqproperty-leading: 0;\n}
combineparts
</patch>


// -------------------------------------------------- Library

<patch>
name=Library Books, author
enabled=true
action=replace_xor_78
position=13BCF48
oldpart=* {\nfont-size: 16px;\nfont-family: Avenir;\nmargin-top: 7px;\n}\n\n
oldpart=[localeName=\"ja_JP\"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\n}\n\n
oldpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"]{\nfont-size: 18px;\n}\n\n
oldpart=[deviceCodeName=\"pixie\"]{\nfont-size: 17px;\nmargin-top: 5px;\n}
newpart=* {\nfont-size: 24px;\nfont-family: Avenir;\nmargin-top: 3px;\n}\n\n
newpart=[localeName=\"ja_JP\"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\n}\n\n
newpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"]{\nfont-size: 30px;\n}\n\n
newpart=[deviceCodeName=\"pixie\"]{\nfont-size: 25px;\nmargin-top: 3px;\n}
combineparts
</patch>

<patch>
name=Library Books, Title
enabled=true
action=replace_xor_C4
position=13BCE38
oldpart=* {\n\tfont-size: 20px;\n\tfont-family: Georgia;\n}\n\n
oldpart=[localeName=\"ja_JP\"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-forceLeading: 0;\n}\n\n
oldpart=[deviceCodeName=\"pixie\"] {\n\tfont-size: 21px;\n}\n\n
oldpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"] {\n\tfont-size: 26px;\n}
newpart=* {\n\tfont-size: 24px;\n\tfont-family: Georgia;\n}\n\n
newpart=[localeName=\"ja_JP\"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tqproperty-forceLeading: 0;\n}\n\n
newpart=[deviceCodeName=\"pixie\"] {\n\tfont-size: 25px;\n}\n\n
newpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"] {\n\tfont-size: 30px;\n}
combineparts
</patch>

<patch>
name=Library Book, READ/FILETYPE/SIZE
enabled=true
action=replace_xor_CE
position=13BCC28
oldpart=* {\ncolor: #666666;\nfont-size: 16px; \nfont-family: Avenir;\n}\n\n
oldpart=[localeName=\"ja_JP\"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\n}\n\n
oldpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"]{\nfont-size: 18px;\n}\n\n
oldpart=[deviceCodeName=\"pixie\"]{\nfont-size: 17px;\n}
newpart=* {\ncolor: #666666;\nfont-size: 18px; \nfont-family: Avenir;\n}\n\n
newpart=[localeName=\"ja_JP\"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\n}\n\n
newpart=[deviceCodeName=\"kraken\"], \n[deviceCodeName=\"phoenix\"]{\nfont-size: 20px;\n}\n\n
newpart=[deviceCodeName=\"pixie\"]{\nfont-size: 19px;\n}
combineparts
</patch>

// -------------------------------------------------- Dictionary

<patch>
name=Dictionary (Georgia)
note=if you use this definition, disable the two other Dictionary definitions
enabled=false
action=replace_string
position=115FB0C
oldpart=* { font: %1px %2; line-height: %4em; }\n
oldpart=ol { font-size: %1px; font-weight: bold; margin-left: %3em }\n
oldpart=ol p { font-size: %1px; font-weight:normal; }\n
oldpart=b { font-weight: bold; }\n
oldpart=i { font-style: italic; }\n
oldpart=b * { font-weight: bold; }\n
oldpart=i * { font-style: italic; }\n
oldpart=::selection { background: #FFFFFF !important; }
newpart=* { font-family: Georgia ;font-size: 24px; line-height: 28px; } \n
newpart=ol {margin-left: 8px} \n
newpart=ol p { font-size: 24px; font-weight:normal;      }
newpart=b { font-weight: bold; }\n
newpart=i { font-style: italic; }\n
newpart=b * { font-weight: bold; }\n
newpart=i * { font-style: italic;  }\n\n\n\n\n\n\n\n\n
newpart=::selection { background: #FFFFFF !important; }
combineparts
</patch>

<patch>
name=Dictionary (Gothic)
note=if you use this definition, disable the two other Dictionary definitions
enabled=true
action=replace_string
position=115FB0C
oldpart=* { font: %1px %2; line-height: %4em; }\n
oldpart=ol { font-size: %1px; font-weight: bold; margin-left: %3em }\n
oldpart=ol p { font-size: %1px; font-weight:normal; }\n
oldpart=b { font-weight: bold; }\n
oldpart=i { font-style: italic; }\n
oldpart=b * { font-weight: bold; }\n
oldpart=i * { font-style: italic; }\n
oldpart=::selection { background: #FFFFFF !important; }
newpart=* { font-family: A-OTF Gothic MB101 Pr6N;font-size: 24px; line-height: 28px; }\n
newpart=ol {margin-left: 8px}\n
newpart=ol p { font-size: 24px; font-weight:normal; }\n
newpart=b { font-weight: bold; }\n
newpart=i { font-style: italic; }\n
newpart=b * { font-weight: bold; }\n
newpart=i * { font-style: italic; } 
newpart=::selection { background: #FFFFFF !important; }
combineparts
</patch>

<patch>
name=Dictionary (Ryumin)
note=if you use this definition, disable the two other Dictionary definitions
enabled=false
action=replace_string
position=115FB0C
oldpart=* { font: %1px %2; line-height: %4em; }\n
oldpart=ol { font-size: %1px; font-weight: bold; margin-left: %3em }\n
oldpart=ol p { font-size: %1px; font-weight:normal; }\n
oldpart=b { font-weight: bold; }\n
oldpart=i { font-style: italic; }\n
oldpart=b * { font-weight: bold; }\n
oldpart=i * { font-style: italic; }\n
oldpart=::selection { background: #FFFFFF !important; }
newpart=* { font-family: A-OTF Ryumin Pr6N ;font-size: 24px; line-height: 28px; } \n
newpart=ol {margin-left: 8px} \n
newpart=ol p { font-size: 24px; font-weight:normal;      }
newpart=b { font-weight: bold; }\n
newpart=i { font-style: italic; }\n
newpart=b * { font-weight: bold; }\n
newpart=i * { font-style: italic; }
newpart=::selection { background: #FFFFFF !important; }
combineparts
</patch>

// -------------------------------------------------- Annotations 
<patch>
name=Annotation Details (Latin script)
note=if you use this patch, disable "Annotation Details (JP)" 
enabled=true
action=replace_string
position=1130FA0
oldpart=<html><body style="font-size: 20px; font-family: sans-serif; ">
newpart=<html><body style="font-size: 28px; font-family: sans-serif; ">
oldpart=<div style="padding-left: 10px; padding-top: 5px; padding-bottom: 3px; background-color: #CCCCCC;">%1</div>
newpart=<div style="padding-left: 10px; padding-top: 5px; padding-bottom: 3px; background-color: #CCCCCC;">%1</div>
oldpart=<div style="color: #404040; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;">%2</div>
newpart=<div style="color: #404040; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;">%2</div>
oldpart=<div style="padding-bottom: 10px; border-top: 2px dotted #AEAEAD;" />
newpart=<div style="padding-bottom: 10px; border-top: 2px dotted #AEAEAD;" />
oldpart=<div style="padding-top: 10px;">%3</div></body></html>
newpart=<div style="padding-top: 10px;">%3</div></body></html>
combineparts
</patch>

<patch>
name=Annotation Details (JP)
note=for usage with Japanese
note=if you use this patch, disable "Annotation Details (Latin script)" 
enabled=false
action=replace_string
position=1130FA0
oldpart=<html><body style="font-size: 20px; font-family: sans-serif; ">
newpart=<html><body style="font: 28px 'A-OTF Gothic MB101 Pr6N';     ">
oldpart=<div style="padding-left: 10px; padding-top: 5px; padding-bottom: 3px; background-color: #CCCCCC;">%1</div>
newpart=<div style="padding-left: 10px; padding-top: 5px; padding-bottom: 3px; background-color: #CCCCCC;">%1</div>
oldpart=<div style="color: #404040; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;">%2</div>
newpart=<div style="color: #404040; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;">%2</div>
oldpart=<div style="padding-bottom: 10px; border-top: 2px dotted #AEAEAD;" />
newpart=<div style="padding-bottom: 10px; border-top: 2px dotted #AEAEAD;" />
oldpart=<div style="padding-top: 10px;">%3</div></body></html>
newpart=<div style="padding-top: 10px;">%3</div></body></html>
combineparts
</patch>


// -------------------------------------------------- Advanced Font Control (from Metazoa)

<Patch>
patch_name = `Freedom to advanced fonts control`
patch_enable = `yes`
replace_bytes = B11C88, 40 F6 C4 E2, 50 F6 F0 E6
replace_bytes = BC1D10, C8 F5 5C E0, 00 46 00 46
replace_bytes = BC5A12, C4 F5 DC E1, 00 46 00 46
</Patch>
