//---- CONTENT
// -------------------------------------------------- Footer and Header
// -------------------------------------------------- Library
// -------------------------------------------------- Book Search
// -------------------------------------------------- Dictionary
// -------------------------------------------------- Annotations
// -------------------------------------------------- Localisation
// -------------------------------------------------- Advanced Font Control (from Metazoa)
// -------------------------------------------------- Custom Font Size (from Metazoa)

sourcefile=libnickel.so.1.0.0
targetfile=..\281a_target\usr\local\Kobo\libnickel.so.1.0.0


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

<patch>
name=ReadingFooter
enabled=true
action=replace_zlib
position=1205FF4

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: 110;\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: 110;\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: 20px;\n}\n\n
newpart=[deviceCodeName="dragon"] {\n\tfont-size: 26px;\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_zlib
position=121B714
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;\n}
newpart=* {\nfont-size: 24px;\nfont-family: Avenir;\nbackground-color: transparent;\npadding-top:3px;\n}\n\n
newpart=[localeName="ja_JP"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\n}
combineparts
</patch>

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

<patch>
name=Library Books, author
enabled=true
action=replace_zlib
position=11F809C

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: 18px;\n}\n\n
#newpart=[deviceCodeName="pixie"]{\nfont-size: 17px;\nmargin-top: 5px;\n}

combineparts
</patch>


<patch>
name=Library Books, Title
enabled=true
action=replace_zlib
position=11F7FFC

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}\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}\n\n
newpart=[deviceCodeName="pixie"] {\n\tfont-size: 21px;\n}\n\n
newpart=[deviceCodeName="kraken"], \n[deviceCodeName="phoenix"] {\n\tfont-size: 26px;\n}

combineparts
</patch>


<patch>
name=Library Book, READ/FILETYPE/SIZE
enabled=true
action=replace_zlib
position=11F7EAC

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: 18px;\n}\n\n
newpart=[deviceCodeName="pixie"]{\nfont-size: 17px;\n}

combineparts
</patch>

// -------------------------------------------------- Book Search

<patch>
name=BookSearch
enabled=true
action=replace_zlib
position=11EB204

oldpart=* {\n\tfont-size: 20px;\n\tfont-family: Avenir;\n\tpadding-left: 10px;\n\tpadding-top: 13px;\n\tpadding-bottom: 13px;\n}\n\n
oldpart=[deviceCodeName="kraken"]{\n\tfont-size: 24px;\n\tpadding-left: 13px;\n\tpadding-top: 16px;\n\tpadding-bottom: 16px;\n}\n\n
oldpart=[deviceCodeName="phoenix"] {\n\tfont-size: 23px;\n\tfont-family: Georgia;\n\tpadding-left: 15px;\n\tpadding-top: 8px;\n\tpadding-bottom: 8px;\n}\n\n
oldpart=[deviceCodeName="dragon"] {\n\tpadding-left: 20px;\n\tpadding-right: 20px;\n\tfont-size: 29px;\n\tfont-family: Georgia;\n}\n\n
oldpart=[localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tpadding-top: 10px;\n\tpadding-bottom: 10px;\n}\n

newpart=* {\n\tfont-size: 29px;\n\tfont-family: Avenir;\n\tpadding-left: 10px;\n\tpadding-top: 13px;\n\tpadding-bottom: 13px;\n}\n\n
newpart=[deviceCodeName="kraken"]{\n\tfont-size: 24px;\n\tpadding-left: 13px;\n\tpadding-top: 16px;\n\tpadding-bottom: 16px;\n}\n\n
newpart=[deviceCodeName="phoenix"] {\n\tfont-size: 23px;\n\tfont-family: Georgia;\n\tpadding-left: 15px;\n\tpadding-top: 8px;\n\tpadding-bottom: 8px;\n}\n\n
newpart=[deviceCodeName="dragon"] {\n\tpadding-left: 20px;\n\tpadding-right: 20px;\n\tfont-size: 29px;\n\tfont-family: Georgia;\n}\n\n
newpart=[localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n\tpadding-top: 10px;\n\tpadding-bottom: 10px;\n}\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=F6FA1C

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; }

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
combineparts
</patch>


<patch>
name=Dictionary (Gothic)
note=if you use this definition, disable the two other Dictionary definitions
enabled=true
action=replace_string
position=F6FA1C

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; }

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; }
combineparts
</patch>

<patch>
name=Dictionary (Ryumin)
note=if you use this definition, disable the two other Dictionary definitions
enabled=false
action=replace_string
position=F6FA1C

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; }

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; }
combineparts
</patch>

// -------------------------------------------------- Annotations

<patch>
name=annotation list, highlighted text
enabled=true
action=replace_zlib
position=11E85C4

oldpart=*{\nfont-size: 20px;\nfont-family: Avenir;\npadding-left: 10px;\npadding-top: 5px;\npadding-bottom: 3px;\nbackground-color: #CCCCCC;\nmin-height: 24px;\nmax-height: 24px;\nborder: 1px solid white;\n}\n\n
oldpart=*[deviceCodeName="kraken"], \n*[deviceCodeName="phoenix"]{\nfont-size: 25px;\npadding-left: 12px;\npadding-top: 6px;\npadding-bottom: 4px;\nmin-height: 30px;\nmax-height: 30px;\n}\n\n
oldpart=[localeName="ja_JP"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\n}

newpart=*{\nfont-size: 30px;\nfont-family: Avenir;\npadding-left: 10px;\npadding-top: 5px;\npadding-bottom: 3px;\nbackground-color: #CCCCCC;\nmin-height: 34px;\nmax-height: 24px;\nborder: 1px solid white;\n}\n\n
#newpart=*[deviceCodeName="kraken"], \n*[deviceCodeName="phoenix"]{\nfont-size: 25px;\npadding-left: 12px;\npadding-top: 6px;\npadding-bottom: 4px;\nmin-height: 30px;\nmax-height: 30px;\n}\n\n
newpart=[localeName="ja_JP"] {\nfont-family: A-OTF Gothic MB101 Pr6N;\n}

combineparts
</patch>

<patch>
name=Annotation list 
enabled=true
note=not sure why there is a second definition
action=replace_string
position=F69874
oldpart=<html><body style="font-size: 25px; font-family: sans-serif; ">
newpart=<html><body style="font-size: 32px; font-family: sans-serif; ">
oldpart=<div style="padding-left: 12px; padding-top: 6px; padding-bottom: 4px; background-color: #CCCCCC;">%1</div>
newpart=<div style="padding-left: 12px; padding-top: 6px; padding-bottom: 4px; background-color: #CCCCCC;">%1</div>
oldpart=<div style="color: #404040; padding-left: 12px; padding-top: 12px; padding-bottom: 12px;">%2</div>
newpart=<div style="color: #404040; padding-left: 12px; padding-top: 12px; padding-bottom: 12px;">%2</div>
oldpart=<div style="padding-bottom: 12px; border-top: 2px dotted #AEAEAD;" />
newpart=<div style="padding-bottom: 12px; border-top: 2px dotted #AEAEAD;" />
oldpart=<div style="padding-top: 12px;">%3</div></body></html>
newpart=<div style="padding-top: 12px;">%3</div></body></html>
combineparts
</patch>

<patch>
name=Annotation Details (Latin script)
note=if you use this patch, disable "Annotation Details (JP)" 
enabled=true
action=replace_string
position=F696E4
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=F696E4
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>


// -------------------------------------------------- Localisation

<patch>
name=en_GB
enabled=false
action=replace_string
position=F30730
olddata=en_US
newdata=en_GB
</patch>

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

<patch>
name=Freedom to advanced fonts control
enabled=true
action=replace_bytes

position=892894
olddata=2C F4 52 EE
newdata=3C F4 4C E9

position=982714
olddata=70 F7 E0 E3
newdata=00 46 00 46

position=984166
olddata=6E F7 B8 E6
newdata=00 46 00 46
</patch>

// -------------------------------------------------- Custom Font Size (from Metazoa)
// Example for inclusion of MZ-style patch definitions

<Patch>
patch_name = `Custom fonts sizes`
patch_enable = `yes`
# Values for replace
replace_int = F773F8, 12, 15
replace_int = F773FC, 14, 16
replace_int = F77400, 16, 17
replace_int = F77404, 17, 18
replace_int = F77408, 18, 19
replace_int = F7740C, 19, 20
replace_int = F77410, 20, 21
replace_int = F77414, 21, 22
replace_int = F77418, 22, 23
replace_int = F7741C, 24, 24
replace_int = F77420, 25, 25
replace_int = F77424, 26, 26
replace_int = F77428, 28, 27
replace_int = F7742C, 32, 28
replace_int = F77430, 36, 29
replace_int = F77434, 40, 30
replace_int = F77438, 44, 31
replace_int = F7743C, 46, 32
replace_int = F77440, 48, 33
replace_int = F77444, 50, 34
replace_int = F77448, 52, 35
replace_int = F7744C, 54, 36
replace_int = F77450, 56, 37
replace_int = F77454, 58, 38
</Patch>
