﻿//---- CONTENT
// -------------------------------------------------- Keyboard
// -------------------------------------------------- Search in dictionaries of extra languages-
// -------------------------------------------------- Dictionary
// -------------------------------------------------- unclassified, increase by 30%

// the code names
// Touch: Trilogy
// Touch 2: 
// Mini: Pixie
// AuraHD: Dragon
// Aura 6": Phoenix
// Glo: uses the values of  Phoenix
// H2O: uses the values of Dragon
// Glo HD: Alyssum
// Aura Edition 2: might use the values of Phonix 
// Aura One: Daylight

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

// -------------------------------------------------- Keyboard


<patch>
name=keyboard 
note=replace characters in newpart with those that you want.
enabled=false
position=autodetect
action=replace_utf8chars_4
oldpart=ßƒ7j£€^¡¿{|«»¢¥•°©…ýÿšžæœþĳŀμªºàáâäãåèéêëìòùíóúôöõøîïûüñçđł
newpart=ßƒ7j£€^¡¿{|«»¢¥•°©…ýÿšžæœþĳŀμªºàáâäãåèéêëìòùíóúôöõøîïûüñçđł
combineparts
</patch>


<patch>
name=keyboard simple test
enabled=false
position=autodetect
action=replace_utf8chars_4
oldpart=ßƒ7j£€^¡¿{|«»¢¥•°©…ýÿšžæœþĳŀμªºàáâäãåèéêëìòùíóúôöõøîïûüñçđł
newpart=abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVW
combineparts
</patch>

<patch>
name=keyboard sanskrit transliteration
enabled=false
position=autodetect
action=replace_utf8chars_4
oldpart=ßƒ7j£€^¡¿{|«»¢¥•°©…ýÿšžæœþĳŀμªºàáâäãåèéêëìòùíóúôöõøîïûüñçđł
newpart=ßƒ7j£€^¡¿{|«»¢¥•°©…śÿṛṝṅṇṃĳŀμªºṣáâäãåṭāêëḍòùīóúôöõūîïûüñçđł
combineparts
</patch>

// -------------------------------------------------- Search in dictionaries of extra languages

<patch>
name=allow search of extra language dictionaries
note:cf. http://www.mobileread.com/forums/showpost.php?p=3311316&postcount=6
enabled=true
action=replace_string
position=autodetect
olddata=\x00E\x00x\x00t\x00r\x00a\x00:\x00 
newdata=\x00E\x00x\x00t\x00r\x00a\x00:\x00:
</patch>


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

<patch>
name=Dictionary, remove long winded closest match notification
note=Idea by pakoe
note=cf. http://www.mobileread.com/forums/showpost.php?p=3043631&postcount=111
enabled=true
action=replace_string
position=autodetect
olddata=Your search for &ldquo;%1&rdquo; did not match any words in the dictionary. The closest match was &ldquo;%2&rdquo;.
newdata=
</patch>


<patch>
name=Dictionary (font chosen by software)
note=if you use this definition, disable the other Dictionary definition(s)
note=92CFBD(4.4.9298)
enabled=true
action=replace_string
position=autodetect
oldpart=p { padding: 0px; margin: 0px; }\n
oldpart=body { padding-left: 8px; }\n
oldpart=* { font: %1px %2; line-height: %5em; }\n
oldpart=div.descriptionFont { font-family: %3; }\n
oldpart=ol { font-size: %1px; font-weight: bold; margin-left: %4em; margin-top: 0px; }\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=img {display: inline-block; width: 1em; height: 1em; vertical-align: -10% !important; }\n
oldpart=::selection { background: #FFFFFF !important; }\n
oldpart=.dividerLine { height: 1px; background: #BBBBBB; }\n
oldpart=.btnAddedFrom { float: left; }\n
oldpart=.btnViewInBook { float: right; }
newpart=p { padding: 0px; margin: 0px; }\n
newpart=body { padding-left: 8px; }\n
#newpart=* { font: %1px %2; line-height: %5em; }\n
newpart=div.descriptionFont { font-family: %3; }\n
#newpart=ol { font-size: %1px; font-weight: bold; margin-left: %4em; margin-top: 0px; }\n
#newpart=ol p { font-size: %1px; font-weight:normal; }\n
###
if $auraone
    newpart=* { font-family: %2; font-size: 55px; line-height: 60px; } \n
    newpart=ol { margin-left: 28px; } \n
    newpart=ol p { font-size: 55px; font-weight:normal; }
else if $aurahd or $h2o
    newpart=* { font-family: %2; font-size: 50px; line-height: 54px; } \n
    newpart=ol { margin-left: 28px; } \n
    newpart=ol p { font-size: 50px; font-weight:normal; }
else if $glo or $aura
    newpart=* { font-family: %2; font-size: 40px; line-height: 44px; } \n
    newpart=ol { margin-left: 24px; } \n
    newpart=ol p { font-size: 40px; font-weight:normal; }
else if $glohd
    newpart=* { font-family: %2; font-size: 56px; line-height: 60px; } \n
    newpart=ol { margin-left: 30px; } \n
    newpart=ol p { font-size: 56px; font-weight:normal; }
else
    newpart=* { font-family: %2; font-size: 32px; line-height: 36px; } \n
    newpart=ol { margin-left: 14px; } \n
    newpart=ol p { font-size: 32px; font-weight:normal; }
end
###
newpart=b { font-weight: bold; }\n
newpart=i { font-style: italic; }\n
newpart=b * { font-weight: bold; }\n
newpart=i * { font-style: italic; }\n
newpart=img {display: inline-block; width: 1em; height: 1em; vertical-align: -10% !important; }\n
newpart=::selection { background: #FFFFFF !important; }\n
newpart=.dividerLine { height: 1px; background: #BBBBBB; }\n
newpart=.btnAddedFrom { float: left; }\n
newpart=.btnViewInBook { float: right; }
combineparts
</patch>

// -------------------------------------------------- unclassified, increase by 30%

#source: C:\data\kobo_extras\tshering\KBPatcher17_4.4.9995\4_plus_source\libnickel.so.1.0.0
#must contain: font:|font-size
#must not contain: 
#hits: 9
#xor-range: 0 to 0

<patch>
name=D4059E(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart= {     if (spans[i].innerHTML.length > 0) {         var firstSize = spans[i].style.fontSize;         var currentFont =  window.getComputedStyle(spans[i], null).getPropertyValue(\'font-size\');         spans[i].style.fontSize = parseInt(currentFont) + 1 + "px";         window.getComputedStyle(spans[i], null).getPropertyValue(\'font-size\');         spans[i].style.fontSize = firstSize;         return true;     }}return true;}
newpart= { if (spans[i].innerHTML.length > 0) { var firstSize = spans[i].style.fontSize; var currentFont = window.getComputedStyle(spans[i], null).getPropertyValue(\'font-size\'); spans[i].style.fontSize = parseInt(currentFont) + 1 + "px"; window.getComputedStyle(spans[i], null).getPropertyValue(\'font-size\'); spans[i].style.fontSize = firstSize; return true; }}return true;}
combineparts
</patch>


<patch>
name=D4AF38(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart=* {\nfont-size: 20px;\nfont-family: Avenir;\n}\n\n
oldpart=[qApp_localeName="ja_JP"] {\nfont-family: Sans-SerifJP;\n}
newpart=* {\nfont-size: 26px;\nfont-family: Avenir;\n}\n
newpart=[qApp_localeName="ja_JP"] {\nfont-family: Sans-SerifJP;\n}
combineparts
</patch>

<patch>
name=D614A4(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart=body { font: %1px %2; } table, thead, tbody, tr, td, th { font-size: inherit; font-family: inherit; }
newpart=body { font: %1px %2; } table, thead, tbody, tr, td, th { font-size: inherit; font-family: inherit; }
combineparts
</patch>


<patch>
name=D659FC(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart=* {\nfont-size: 48px;\nfont-family: Georgia;\npadding-top: 5px;\n}\n\n
oldpart=[qApp_localeName="ja_JP"] {\nfont-family: Sans-SerifJP;\n}
newpart=* {\nfont-size: 60px;\nfont-family: Georgia;\npadding-top: 5px;\n}\n
newpart=[qApp_localeName="ja_JP"] {\nfont-family: Sans-SerifJP;\n}
combineparts
</patch>


<patch>
name=D65AB0(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart=* {\nfont-size: 26px;\nfont-family: Georgia;\npadding-top: 2px;\n}\n\n
oldpart=[qApp_localeName="ja_JP"] {\nfont-family: Sans-SerifJP;\n}
newpart=* {\nfont-size: 32px;\nfont-family: Georgia;\npadding-top: 2px;\n}\n
newpart=[qApp_localeName="ja_JP"] {\nfont-family: Sans-SerifJP;\n}
combineparts
</patch>


<patch>
name=D878FB(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart=body {font: %1px %3; line-height: 1.775em;}h1 {font: %2px %3; line-height: 1.775em; font-weight:bold;}h2 {font: %1px %3; line-height: 1.775em; font-weight:bold;}
newpart=body {font: %1px %3; line-height: 1.775em;}h1 {font: %2px %3; line-height: 1.775em; font-weight:bold;}h2 {font: %1px %3; line-height: 1.775em; font-weight:bold;}
combineparts
</patch>


<patch>
name=DA5B2C(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart=#text {\n\tfont-size:20px;\n\tpadding-left:8px;\n\tpadding-right:8px;\n}\n\n
oldpart=#frame {\n\tborder:2px solid black;\n}\n
newpart=#text {\n\tfont-size:20px;\n\tpadding-left:8px;\n\tpadding-right:8px;\n}\n
newpart=#frame {\n\tborder:2px solid black;\n}\n
combineparts
</patch>


<patch>
name=DB0748(4.4.9995)
enabled=true
action=replace_string
position=autodetect
oldpart=.mfss { color: black !important; font-size: medium !important; } \n* { -webkit-text-size-adjust: auto !important; }
newpart=.mfss { color: black !important; font-size: medium !important; } \n* { -webkit-text-size-adjust: auto !important; }
combineparts
</patch>

