跳转至

水印模板

Templates

BINARY_REPRESENTATION

Insert the selected character after the text to represent a 1 in binary, otherwise 0.

The characters are from combining_chars, invisible_chars and whitespace_chars.

confusables_chars_key is needed

You can choose one of the characters to insert the watermark

Differents between combining_chars, invisible_chars and whitespace_chars

combining_chars: Small but recognizable difference in characters before and after watermarking

invisible_chars: You can't see the difference between before and after inserting the watermark

whitespace_chars: There is a small but recognizable difference in the spacing of characters before and after watermarking

CONFUSABLES_CHARS_LIST: list = combining_chars.CONFUSABLES_CHARS + invisible_chars.CONFUSABLES_CHARS + whitespace_chars.CONFUSABLES_CHARS + ['\x7f'] module-attribute

CONFUSABLES_CHARS: dict = dict(zip(CONFUSABLES_CHARS_LIST, CONFUSABLES_CHARS_LIST)) module-attribute

method: WMMethod = WMMethod.APPEND_AS_BINARY module-attribute

See examples in Binary representation.

COMBINING_CHARS

In concept, a combining character is a mark of some kind intended to be positioned relative to some other character, which is referred to as its associated base character.

CONFUSABLES_CHARS: list = ['̀', '́', '̂', '̃', '̄', '̆', '̇', '̈', '̉', '̊', '̋', '̌', '̏', '̑', '̛', '̣', '̤', '̥', '̦', '̧', '̨', '̭', '̮', '̰', '̱', '̸', '̀', '́', '̈́', '҇', 'ֺ', 'ࣣ', 'ི', 'ོ', 'ཽ', 'ྀ', '⳯', '⳰', '⳱', '꙯', 'ꙴ', 'ꙵ', 'ꙶ', 'ꙷ', 'ꙸ', 'ꙹ', 'ꙺ', 'ꙻ', '꙼', '꙽', 'ꚟ'] module-attribute

method: WMMethod = WMMethod.APPEND_TO_CHAR module-attribute

Python
"""
In concept, a combining character is a mark of some kind intended to be positioned relative to 
some other character, which is referred to as its associated base character.
"""

from ..defines import WMMethod

# 组合字符,如音标等
CONFUSABLES_CHARS: list = [
    "\u0300",
    "\u0301",
    "\u0302",
    "\u0303",
    "\u0304",
    "\u0306",
    "\u0307",
    "\u0308",
    "\u0309",
    "\u030a",
    "\u030b",
    "\u030c",
    "\u030f",
    "\u0311",
    "\u031b",
    "\u0323",
    "\u0324",
    "\u0325",
    "\u0326",
    "\u0327",
    "\u0328",
    "\u032d",
    "\u032e",
    "\u0330",
    "\u0331",
    "\u0338",
    "\u0340",
    "\u0341",
    "\u0344",
    "\u0487",
    "\u05ba",
    "\u08e3",
    "\u0f72",
    "\u0f7c",
    "\u0f7d",
    "\u0f80",
    "\u2cef",
    "\u2cf0",
    "\u2cf1",
    "\ua66f",
    "\ua674",
    "\ua675",
    "\ua676",
    "\ua677",
    "\ua678",
    "\ua679",
    "\ua67a",
    "\ua67b",
    "\ua67c",
    "\ua67d",
    "\ua69f",
]
method: WMMethod = WMMethod.APPEND_TO_CHAR

See examples in Combining characters.

FONT_COLOR

Font color template can only be used when the text can be displayed in HTML mode. Such as WEB page, Blog, EMail, etc. You can customize your own color pairs following the template format.

Need to wrap surrounding elements

It should be noted that all text needs to be wrapped with a layer of elements in order to obtain a unified style display

confusables_chars_key is needed

You can choose one of the key to insert the watermark

CONFUSABLES_CHARS: dict = {'black1': ['#000', '#111'], 'black2': ['#000', '#222'], 'black3': ['#000', '#333'], 'black4': ['#000', '#444'], 'black5': ['#000', '#555'], 'black6': ['#000', '#666'], 'white1': ['#fff', '#eee'], 'white2': ['#fff', '#ddd'], 'white3': ['#fff', '#ccc'], 'white4': ['#fff', '#bbb'], 'white5': ['#fff', '#aaa'], 'white6': ['#fff', '#999']} module-attribute

method: WMMethod = WMMethod.DECORATE_EACH_CHAR module-attribute

See examples in Font color.

FONT_FLOAT

Font float template can only be used when the text can be displayed in HTML mode. Such as WEB page, Blog, EMail, etc. You can customize your own float pairs following the template format.

Need to wrap surrounding elements

It should be noted that all text needs to be wrapped with a layer of elements in order to obtain a unified style display

confusables_chars_key is needed

You can choose one of the key to insert the watermark

CONFUSABLES_CHARS: dict = {'up1': ['top:0', 'top:-1px'], 'up2': ['top:0', 'top:-2px'], 'up3': ['top:0', 'top:-3px'], 'up4': ['top:0', 'top:-4px'], 'up5': ['top:0', 'top:-5px'], 'down1': ['bottom:0', 'bottom:-1px'], 'down2': ['bottom:0', 'bottom:-2px'], 'down3': ['bottom:0', 'bottom:-3px'], 'down4': ['bottom:0', 'bottom:-4px'], 'down5': ['bottom:0', 'bottom:-5px'], 'left1': ['left:0', 'left:-1px'], 'left2': ['left:0', 'left:-2px'], 'left3': ['left:0', 'left:-3px'], 'left4': ['left:0', 'left:-4px'], 'left5': ['left:0', 'left:-5px'], 'right1': ['right:0', 'right:-1px'], 'right2': ['right:0', 'right:-2px'], 'right3': ['right:0', 'right:-3px'], 'right4': ['right:0', 'right:-4px'], 'right5': ['right:0', 'right:-5px']} module-attribute

method: WMMethod = WMMethod.DECORATE_EACH_CHAR module-attribute

See examples in Font float.

FONT_SIZE

Font size template can only be used when the text can be displayed in HTML mode. Such as WEB page, Blog, EMail, etc.

Need to wrap surrounding elements

It should be noted that all text needs to be wrapped with a layer of elements in order to obtain a unified style display

confusables_chars_key is needed

You can choose one of the key to insert the watermark

CONFUSABLES_CHARS: dict = {'80': ['100%', '80%'], '81': ['100%', '81%'], '82': ['100%', '82%'], '83': ['100%', '83%'], '84': ['100%', '84%'], '85': ['100%', '85%'], '86': ['100%', '86%'], '87': ['100%', '87%'], '88': ['100%', '88%'], '89': ['100%', '89%'], '90': ['100%', '90%'], '91': ['100%', '91%'], '92': ['100%', '92%'], '93': ['100%', '93%'], '94': ['100%', '94%'], '95': ['100%', '95%'], '96': ['100%', '96%'], '97': ['100%', '97%'], '98': ['100%', '98%'], '99': ['100%', '99%'], '101': ['100%', '101%'], '102': ['100%', '102%'], '103': ['100%', '103%'], '104': ['100%', '104%'], '105': ['100%', '105%'], '106': ['100%', '106%'], '107': ['100%', '107%'], '108': ['100%', '108%'], '109': ['100%', '109%'], '110': ['100%', '110%'], '111': ['100%', '111%'], '112': ['100%', '112%'], '113': ['100%', '113%'], '114': ['100%', '114%'], '115': ['100%', '115%'], '116': ['100%', '116%'], '117': ['100%', '117%'], '118': ['100%', '118%'], '119': ['100%', '119%'], '120': ['100%', '120%']} module-attribute

method: WMMethod = WMMethod.DECORATE_EACH_CHAR module-attribute

See examples in Font size.

FONT_STYLE

Font style template can only be used when the text can be displayed in HTML mode. Such as WEB page, Blog, EMail, etc. You can customize your own style pairs following the template format.

Need to wrap surrounding elements

It should be noted that all text needs to be wrapped with a layer of elements in order to obtain a unified style display

confusables_chars_key is needed

You can choose one of the key to insert the watermark

CONFUSABLES_CHARS: dict = {'text-decoration-underline': ['text-decoration:none', 'text-decoration:underline'], 'text-decoration-line-through': ['text-decoration: none', 'text-decoration: line-through'], 'text-decoration-overline': ['text-decoration: none', 'text-decoration: overline'], 'background-color-white-gray-1': ['background-color:#fff', 'background-color:#eee'], 'background-color-white-gray-2': ['background-color:#fff', 'background-color:#ddd'], 'background-color-white-red-1': ['background-color:#fff', 'background-color:#eff'], 'background-color-white-red-2': ['background-color:#fff', 'background-color:#dff'], 'background-color-white-green-1': ['background-color:#fff', 'background-color:#fef'], 'background-color-white-green-2': ['background-color:#fff', 'background-color:#fdf'], 'background-color-white-blue-1': ['background-color:#fff', 'background-color:#ffe'], 'background-color-white-blue-2': ['background-color:#fff', 'background-color:#ffd'], 'background-color-black-gray-1': ['background-color:#000', 'background-color:#111'], 'background-color-black-gray-2': ['background-color:#000', 'background-color:#222'], 'background-color-black-red-1': ['background-color:#000', 'background-color:#100'], 'background-color-black-red-2': ['background-color:#000', 'background-color:#200'], 'background-color-black-green-1': ['background-color:#000', 'background-color:#010'], 'background-color-black-green-2': ['background-color:#000', 'background-color:#020'], 'background-color-black-blue-1': ['background-color:#000', 'background-color:#001'], 'background-color-black-blue-2': ['background-color:#000', 'background-color:#002'], 'border-top-white-dashed-1': ['border-top: ;', 'border-top: 1px dashed #eee;'], 'border-top-white-dashed-2': ['border-top: ;', 'border-top: 1px dashed #ddd;'], 'border-top-white-dashed-3': ['border-top: ;', 'border-top: 1px dashed #ccc;'], 'border-bottom-white-dashed-1': ['border-bottom: ;', 'border-bottom: 1px dashed #eee;'], 'border-bottom-white-dashed-2': ['border-bottom: ;', 'border-bottom: 1px dashed #ddd;'], 'border-bottom-white-dashed-3': ['border-bottom: ;', 'border-bottom: 1px dashed #ccc;'], 'border-left-white-dashed-1': ['border-left: ;', 'border-left: 1px dashed #eee;'], 'border-left-white-dashed-2': ['border-left: ;', 'border-left: 1px dashed #ddd;'], 'border-left-white-dashed-3': ['border-left: ;', 'border-left: 1px dashed #ccc;'], 'border-right-white-dashed-1': ['border-right: ;', 'border-right: 1px dashed #eee;'], 'border-right-white-dashed-2': ['border-right: ;', 'border-right: 1px dashed #ddd;'], 'border-right-white-dashed-3': ['border-right: ;', 'border-right: 1px dashed #ccc;'], 'border-top-white-solid-1': ['border-top: ;', 'border-top: 1px solid #eee;'], 'border-top-white-solid-2': ['border-top: ;', 'border-top: 1px solid #ddd;'], 'border-top-white-solid-3': ['border-top: ;', 'border-top: 1px solid #ccc;'], 'border-bottom-white-solid-1': ['border-bottom: ;', 'border-bottom: 1px solid #eee;'], 'border-bottom-white-solid-2': ['border-bottom: ;', 'border-bottom: 1px solid #ddd;'], 'border-bottom-white-solid-3': ['border-bottom: ;', 'border-bottom: 1px solid #ccc;'], 'border-left-white-solid-1': ['border-left: ;', 'border-left: 1px solid #eee;'], 'border-left-white-solid-2': ['border-left: ;', 'border-left: 1px solid #ddd;'], 'border-left-white-solid-3': ['border-left: ;', 'border-left: 1px solid #ccc;'], 'border-right-white-solid-1': ['border-right: ;', 'border-right: 1px solid #eee;'], 'border-right-white-solid-2': ['border-right: ;', 'border-right: 1px solid #ddd;'], 'border-right-white-solid-3': ['border-right: ;', 'border-right: 1px solid #ccc;'], 'font-style-italic': ['font-style:normal', 'font-style:italic']} module-attribute

method: WMMethod = WMMethod.DECORATE_EACH_CHAR module-attribute

See examples in Font style.

FONT_WEIGHT

Font weight template can only be used when the text can be displayed in HTML mode. Such as WEB page, Blog, EMail, etc.

Need to wrap surrounding elements

It should be noted that all text needs to be wrapped with a layer of elements in order to obtain a unified style display

confusables_chars_key is needed

You can choose one of the key to insert the watermark

CONFUSABLES_CHARS: dict = {'lighter': ['normal', 'lighter'], 'bolder': ['normal', 'bolder'], 'lighter-bolder': ['lighter', 'bolder'], '100-200': ['100', '200'], '200-300': ['200', '300'], '300-400': ['300', '400'], '400-500': ['400', '500'], '500-600': ['500', '600'], '600-700': ['600', '700'], '700-800': ['700', '800'], '800-900': ['800', '900']} module-attribute

method: WMMethod = WMMethod.DECORATE_EACH_CHAR module-attribute

See examples in Font weight.

HOMOGRAPH_CHINESE

Homographs in Chinese

This template uses one character with the same font but different Unicode encoding to replace another character. The naked eye cannot see the difference before and after inserting the watermark

CONFUSABLES_CHARS: dict = {'°': '゜', '″': '゛', ',': '٫', '。': '˳', ':': '⁚', '!': '!', '?': '?', '、': '˴', ';': ';', '—': '-', '·': '‧', '敖': '敖', '廒': '廒', '翺': '翺', '慠': '慠', '八': '⼋', '拔': '拔', '跋': '跋', '白': '⽩', '韛': '韛', '䬳': '䬳', '勹': '⼓', '包': '包', '宀': '⼧', '駂': '駂', '寳': '寳', '抱': '抱', '報': '報', '暴': '暴', '卑': '卑', '碑': '碑', '北': '北', '贝': '⻉', '貝': '⾙', '備': '備', '犕': '犕', '糒': '糒', '奔': '奔', '泍': '泍', '賁': '賁', '䑫': '䑫', '絣': '絣', '跰': '跰', '鼻': '⿐', '匕': '⼔', '比': '⽐', '庳': '庳', '婢': '婢', '韠': '韠', '釆': '⾤', '便': '便', '變': '變', '髟': '⾽', '賓': '賓', '仌': '仌', '栟': '栟', '鉼': '鉼', '疒': '⽧', '併': '倂', '並': '並', '庰': '庰', '摒': '摒', '癶': '⽨', '磻': '磻', '博': '博', '鈸': '鈸', '卜': '⼘', '不': '不', '彩': '彩', '菜': '菜', '参': '參', '憯': '憯', '艹': '⺾', '艸': '⾋', '刂': '⺉', '層': '層', '㛼': '㛼', '茶': '茶', '剷': '剷', '嵼': '嵼', '䩶': '䩶', '镸': '⻒', '長': '⻑', '厂': '⼚', '㫤': '㫤', '鬯': '⾿', '巢': '巢', '鄛': '鄛', '潮': '潮', '罺': '罺', '车': '⻋', '車': '⾞', '屮': '⼬', '瞋': '瞋', '臣': '⾂', '辰': '⾠', '䕝': '䕝', '成': '成', '呈': '呈', '城': '城', '誠': '誠', '懲': '懲', '蚩': '蚩', '喫': '喫', '遲': '遲', '齿': '⻮', '歯': '⻭', '齒': '⿒', '彳': '⼻', '叱': '叱', '赤': '⾚', '充': '充', '虫': '⾍', '臭': '臭', '巛': '⼮', '舛': '⾇', '串': '串', '辵': '⾡', '慈': '慈', '堲': '堲', '辞': '辞', '甆': '甆', '嬨': '嬨', '次': '次', '刺': '刺', '螆': '螆', '䗹': '䗹', '匆': '匆', '䐋': '䐋', '熜': '熜', '聰': '聰', '爨': '爨', '脃': '脃', '寸': '⼨', '蔖': '蔖', '大': '⼤', '歹': '⽍', '瑇': '瑇', '戴': '戴', '亻': '⺅', '卩': '⼙', '丹': '丹', '当': '当', '刀': '⼑', '菧': '菧', '墬': '墬', '嵮': '嵮', '滇': '滇', '㒹': '㒹', '彫': '彫', '調': '調', '蜨': '蜨', '鼎': '⿍', '冬': '冬', '徚': '徚', '洞': '洞', '都': '都', '㨮': '㨮', '斗': '⽃', '豆': '⾖', '鬥': '⾾', '讀': '讀', '度': '度', '煅': '煅', '惇': '惇', '多': '多', '歺': '⺞', '咢': '咢', '恶': '惡', '餩': '餩', '儿': '⼉', '而': '⽽', '耳': '⽿', '二': '⼆', '繁': '繁', '犭': '⺨', '攵': '⺙', '犯': '犯', '汎': '汎', '飯': '飯', '匚': '⼕', '方': '⽅', '飞': '⻜', '非': '⾮', '飛': '⾶', '鼖': '鼖', '墳': '墳', '幩': '幩', '憤': '憤', '风': '⻛', '風': '⾵', '夆': '夆', '缶': '⽸', '父': '⽗', '福': '福', '輻': '輻', '阜': '⾩', '婦': '婦', '復': '復', '覆': '覆', '槪': '槪', '甘': '⽢', '干': '⼲', '䯎': '䯎', '贛': '贛', '罓': '⺱', '港': '港', '高': '⾼', '戈': '⼽', '割': '割', '革': '⾰', '鬲': '⿀', '艮': '⾉', '更': '更', '工': '⼯', '弓': '⼸', '廾': '⼶', '㺬': '㺬', '谷': '⾕', '骨': '⻣', '鼓': '⿎', '穀': '穀', '頋': '頋', '瓜': '⽠', '柺': '柺', '瘝': '瘝', '舘': '舘', '館': '館', '卝': '⻀', '毋': '⽏', '广': '⼴', '龟': '⻳', '亀': '⻲', '嶲': '嶲', '龜': '龜', '鬼': '⻤', '海': '海', '漢': '漢', '行': '⾏', '噑': '噑', '浩': '浩', '喝': '喝', '禾': '⽲', '㮝': '㮝', '褐': '褐', '鶴': '鶴', '齃': '齃', '黑': '⿊', '壷': '壷', '虍': '⾌', '虎': '⻁', '户': '⼾', '花': '花', '㭉': '㭉', '華': '華', '滑': '滑', '鋘': '鋘', '画': '画', '荒': '荒', '慌': '慌', '黄': '⻩', '黃': '⿈', '㤺': '㤺', '兤': '兤', '灰': '灰', '悔': '悔', '卉': '卉', '惠': '恵', '喙': '喙', '㒞': '㒞', '火': '⽕', '灬': '⺣', '禍': '禍', '枅': '枅', '飢': '飢', '姬': '姬', '及': '及', '㔕': '㔕', '即': '即', '卽': '卽', '揤': '揤', '䳭': '䳭', '几': '⼏', '己': '⼰', '彐': '⺕', '彑': '⺔', '旡': '⺛', '紀': '紀', '旣': '既', '穊': '穊', '䀈': '䀈', '冀': '冀', '鱀': '鱀', '戛': '戛', '賈': '賈', '駱': '駱', '䄯': '䄯', '趼': '趼', '见': '⻅', '見': '⾒', '将': '将', '降': '降', '摾': '摾', '糨': '糨', '纟': '⺰', '糹': '⺯', '角': '⻆', '摷': '摷', '叫': '叫', '莭': '莭', '䀹': '䀹', '節': '節', '巾': '⼱', '斤': '⽄', '钅': '⻐', '金': '⾦', '蓳': '蓳', '謹': '謹', '晋': '晉', '浸': '浸', '搢': '搢', '縉': '縉', '精': '精', '敬': '敬', '靖': '靖', '瀞': '瀞', '韭': '⾲', '臼': '⾅', '䳎': '䳎', '菊': '菊', '句': '句', '具': '具', '捐': '捐', '鋗': '鋗', '悁': '悁', '睊': '睊', '爵': '爵', '菌': '菌', '開': '開', '慨': '慨', '殻': '殻', '刻': '刻', '口': '⼝', '扝': '扝', '苦': '苦', '况': '况', '虧': '虧', '夔': '䕫', '䪲': '䪲', '㱎': '㱎', '廓': '廓', '拉': '拉', '喇': '喇', '臘': '臘', '蠟': '蠟', '来': '來', '癩': '癩', '嵐': '嵐', '藍': '藍', '襤': '襤', '蘭': '蘭', '欄': '欄', '懶': '懶', '嬾': '嬾', '濫': '濫', '爛': '爛', '郎': '郎', '狼': '狼', '廊': '廊', '朗': '朗', '浪': '浪', '劳': '劳', '牢': '牢', '勞': '勞', '耂': '⺹', '老': '⽼', '烙': '烙', '酪': '酪', '勒': '勒', '了': '了', '雷': '雷', '耒': '⽾', '磊': '磊', '壘': '壘', '肋': '肋', '类': '类', '累': '累', '淚': '淚', '類': '類', '稜': '稜', '冷': '冷', '梨': '梨', '黎': '黎', '罹': '罹', '離': '離', '驪': '驪', '李': '李', '里': '⾥', '理': '理', '裡': '裡', '裏': '裏', '禮': '禮', '醴': '醴', '力': '⼒', '立': '⽴', '吏': '吏', '丽': '丽', '利': '利', '例': '例', '隶': '⾪', '栗': '栗', '笠': '笠', '粒': '粒', '痢': '痢', '慄': '慄', '隷': '隸', '勵': '勵', '歷': '歷', '曆': '曆', '麗': '麗', '礪': '礪', '轢': '轢', '怜': '怜', '連': '連', '蓮': '蓮', '廉': '廉', '漣': '漣', '憐': '憐', '聯': '聯', '簾': '簾', '璉': '璉', '煉': '煉', '練': '練', '殮': '殮', '鍊': '鍊', '戀': '戀', '良': '良', '凉': '凉', '梁': '梁', '糧': '糧', '冫': '⼎', '两': '兩', '亮': '亮', '量': '量', '諒': '諒', '僚': '僚', '遼': '遼', '寮': '寮', '燎': '燎', '療': '療', '蓼': '蓼', '料': '料', '列': '列', '劣': '劣', '烈': '烈', '裂': '裂', '獵': '獵', '林': '林', '淋': '淋', '隣': '隣', '璘': '璘', '燐': '燐', '臨': '臨', '鱗': '鱗', '麟': '麟', '凛': '凜', '吝': '吝', '藺': '藺', '囹': '囹', '玲': '玲', '凌': '凌', '陵': '陵', '聆': '聆', '菱': '菱', '羚': '羚', '零': '零', '鈴': '鈴', '綾': '綾', '靈': '靈', '領': '領', '嶺': '嶺', '令': '令', '溜': '溜', '留': '留', '流': '流', '琉': '琉', '硫': '硫', '裗': '裗', '劉': '劉', '柳': '柳', '六': '六', '龙': '⻰', '竜': '⻯', '隆': '隆', '龍': '⿓', '籠': '籠', '聾': '聾', '㴳': '㴳', '壟': '壟', '慺': '慺', '樓': '樓', '陋': '陋', '漏': '漏', '盧': '盧', '蘆': '蘆', '廬': '廬', '爐': '爐', '卤': '⻧', '鹵': '⿄', '虜': '虜', '魯': '魯', '擄': '擄', '櫓': '櫓', '陸': '陸', '菉': '菉', '鹿': '⿅', '祿': '祿', '碌': '碌', '賂': '賂', '路': '路', '䘵': '䘵', '戮': '戮', '錄': '錄', '䩮': '䩮', '露': '露', '鷺': '鷺', '鸞': '鸞', '卵': '卵', '亂': '亂', '掠': '掠', '倫': '倫', '崙': '崙', '淪': '淪', '輪': '輪', '論': '論', '螺': '螺', '羅': '羅', '蘿': '蘿', '邏': '邏', '剆': '剆', '裸': '裸', '洛': '洛', '珞': '珞', '落': '落', '䌴': '䌴', '閭': '閭', '䕡': '䕡', '呂': '呂', '旅': '旅', '屢': '屢', '履': '履', '縷': '縷', '律': '律', '率': '率', '綠': '綠', '濾': '濾', '略': '略', '麻': '⿇', '䳸': '䳸', '马': '⻢', '馬': '⾺', '麦': '⻨', '売': '売', '麥': '⿆', '㡢': '㡢', '莽': '莽', '毛': '⽑', '矛': '⽭', '冒': '冒', '㒻': '㒻', '帽': '帽', '梅': '梅', '䍙': '䍙', '门': '⻔', '門': '⾨', '懞': '懞', '夢': '夢', '米': '⽶', '糸': '⽷', '泌': '泌', '鼏': '鼏', '免': '免', '黾': '⻪', '勉': '勉', '冕': '冕', '面': '⾯', '哶': '哶', '民': '⺠', '皿': '⽫', '敏': '敏', '黽': '⿌', '摩': '摩', '墨': '墨', '母': '⺟', '木': '⽊', '目': '⽬', '拏': '拏', '肭': '肭', '奈': '奈', '難': '難', '内': '內', '泥': '泥', '你': '你', '匿': '匿', '溺': '溺', '年': '年', '秊': '秊', '捻': '捻', '輦': '輦', '撚': '撚', '念': '念', '鸟': '⻦', '鳥': '⿃', '尿': '尿', '肀': '⺺', '涅': '涅', '寜': '寧', '寧': '寧', '牛': '⽜', '杻': '杻', '紐': '紐', '弄': '弄', '怒': '怒', '虐': '虐', '諾': '諾', '女': '⼥', '派': '派', '爿': '⽙', '龎': '龎', '噴': '噴', '濆': '濆', '䦕': '䦕', '皮': '⽪', '㓟': '㓟', '脾': '脾', '片': '⽚', '拼': '拼', '姘': '姘', '頻': '頻', '聠': '聠', '頩': '頩', '冖': '⼍', '郱': '郱', '荓': '荓', '洴': '洴', '㺸': '㺸', '塀': '塀', '蓱': '蓱', '蛢': '蛢', '缾': '缾', '䈂': '䈂', '竮': '竮', '鵧': '鵧', '攴': '⽁', '暜': '暜', '齐': '⻬', '斉': '⻫', '祈': '祈', '齊': '⿑', '邔': '邔', '芑': '芑', '杞': '杞', '起': '起', '豈': '豈', '啓': '啓', '气': '⽓', '契': '契', '器': '器', '岍': '岍', '汧': '汧', '蚈': '蚈', '雃': '雃', '鳽': '鳽', '䗗': '䗗', '灊': '灊', '凵': '⼐', '欠': '⽋', '䵖': '䵖', '襁': '襁', '鏹': '鏹', '瞧': '瞧', '切': '切', '勤': '勤', '青': '⻘', '靑': '⾭', '卿': '卿', '晴': '晴', '請': '請', '瓊': '瓊', '全': '全', '犬': '⽝', '嬈': '嬈', '人': '⼈', '䚾': '䚾', '忍': '忍', '刃': '刃', '䏕': '䏕', '軔': '軔', '日': '⽇', '荣': '荣', '冗': '冗', '肉': '⾁', '入': '⼊', '阮': '阮', '甤': '甤', '蕤': '蕤', '若': '若', '塞': '塞', '彡': '⼺', '氵': '⺡', '糣': '糣', '桒': '桒', '繅': '繅', '掃': '掃', '㛮': '㛮', '色': '⾊', '僧': '僧', '殺': '殺', '閷': '閷', '山': '⼭', '㣣': '㣣', '善': '善', '勺': '勺', '杓': '杓', '奢': '奢', '檨': '檨', '舌': '⾆', '捨': '捨', '社': '社', '身': '⾝', '什': '什', '神': '神', '沈': '沈', '慎': '慎', '生': '⽣', '省': '省', '盛': '盛', '尸': '⼫', '十': '⼗', '饣': '⻠', '石': '⽯', '䂖': '䂖', '拾': '拾', '食': '⻝', '識': '識', '矢': '⽮', '豕': '⾗', '士': '⼠', '氏': '⽒', '礻': '⺭', '示': '⽰', '視': '視', '手': '⼿', '首': '⾸', '寿': '寿', '殳': '⽎', '疋': '⽦', '書': '書', '輸': '輸', '秫': '秫', '暑': '暑', '黍': '⿉', '署': '署', '鼠': '⿏', '丨': '⼁', '忄': '⺖', '庶': '庶', '數': '數', '㶖': '㶖', '水': '⽔', '氺': '⺢', '帨': '帨', '裞': '裞', '說': '說', '説': '說', '厶': '⼛', '巳': '⺒', '罒': '⺫', '飼': '飼', '搜': '搜', '醙': '醙', '叟': '叟', '夊': '⼢', '歲': '歲', '索': '索', '獺': '獺', '䏙': '䏙', '炭': '炭', '嘆': '嘆', '唐': '唐', '糖': '糖', '弢': '弢', '絛': '絛', '啕': '啕', '扌': '⺘', '田': '⽥', '磌': '磌', '瑱': '瑱', '窱': '窱', '冂': '⼌', '突': '突', '屠': '屠', '圖': '圖', '圗': '圗', '土': '⼟', '兔': '兔', '堍': '堍', '侻': '侻', '娧': '娧', '駾': '駾', '拓': '拓', '瓦': '⽡', '嗢': '嗢', '丸': '丸', '挽': '挽', '王': '王', '网': '⽹', '忹': '忹', '惘': '惘', '望': '望', '囗': '⼞', '韦': '⻙', '韋': '⾱', '䧦': '䧦', '撝': '撝', '㬙': '㬙', '䈧': '䈧', '殟': '殟', '㬈': '㬈', '瘟': '瘟', '文': '⽂', '穏': '穏', '无': '⽆', '茣': '茣', '洖': '洖', '侮': '侮', '兀': '⺎', '夕': '⼣', '覀': '⻃', '西': '⻄', '吸': '吸', '犀': '犀', '熙': '𤋮', '凞': '凞', '㩬': '㩬', '匸': '⼖', '舄': '舄', '䊠': '䊠', '虩': '虩', '咞': '咞', '啣': '啣', '憲': '憲', '香': '⾹', '祥': '祥', '蠁': '蠁', '響': '響', '像': '像', '小': '⼩', '䀘': '䀘', '心': '⼼', '辛': '⾟', '形': '形', '㼛': '㼛', '侀': '侀', '型': '型', '硎': '硎', '鉶': '鉶', '峀': '峀', '歔': '歔', '玄': '⽞', '穴': '⽳', '血': '⾎', '㤜': '㤜', '巡': '巡', '巽': '巽', '牙': '⽛', '芽': '芽', '襾': '⾑', '咽': '咽', '淹': '淹', '湮': '湮', '讠': '⻈', '言': '⾔', '沿': '沿', '㿼': '㿼', '揅': '揅', '奄': '奄', '掩': '掩', '嵃': '嵃', '裺': '裺', '羊': '⽺', '羕': '羕', '幺': '⺓', '吆': '吆', '䌁': '䌁', '爻': '⽘', '嗂': '嗂', '徭': '徭', '榣': '榣', '㞁': '㞁', '页': '⻚', '頁': '⾴', '葉': '葉', '䁆': '䁆', '謁': '謁', '一': '⼀', '衤': '⻂', '衣': '⾐', '乁': '乁', '㰘': '㰘', '乙': '⼄', '㠯': '㠯', '弋': '⼷', '邑': '⾢', '易': '易', '㣇': '㣇', '益': '益', '異': '異', '逸': '逸', '廙': '廙', '乚': '⺃', '音': '⾳', '滛': '滛', '廴': '⼵', '瑩': '瑩', '瀛': '瀛', '媵': '媵', '勇': '勇', '用': '⽤', '尢': '⺐', '尣': '⺏', '酉': '⾣', '又': '⼜', '祐': '祐', '梎': '梎', '鱼': '⻥', '舁': '舁', '娛': '娛', '魚': '⿂', '揄': '揄', '瑜': '瑜', '羽': '⽻', '雨': '⾬', '㡼': '㡼', '瘐': '瘐', '玉': '⽟', '芋': '芋', '聿': '⾀', '育': '育', '愈': '愈', '諭': '諭', '冤': '冤', '寃': '寃', '蜎': '蜎', '䛇': '䛇', '曰': '⽈', '月': '⽉', '玥': '玥', '樂': '樂', '龠': '⿕', '瀹': '瀹', '暈': '暈', '蝹': '蝹', '馧': '馧', '霣': '霣', '災': '災', '甾': '甾', '再': '再', '鐕': '鐕', '偺': '偺', '璅': '璅', '憎': '憎', '贈': '贈', '喳': '喳', '楂': '楂', '牐': '牐', '宅': '宅', '长': '⻓', '杖': '杖', '爪': '⽖', '爫': '⺤', '乛': '⺂', '者': '者', '着': '着', '真': '真', '禎': '禎', '鬒': '鬒', '支': '⽀', '芝': '芝', '鼅': '鼅', '直': '直', '埴': '埴', '夂': '⼡', '止': '⽌', '祉': '祉', '茝': '茝', '黹': '⿋', '至': '⾄', '志': '志', '豸': '⾘', '炙': '炙', '寘': '寘', '櫛': '櫛', '塚': '塚', '舟': '⾈', '周': '周', '猪': '猪', '蝫': '蝫', '諸': '諸', '竹': '⽵', '陼': '陼', '渚': '渚', '煮': '煮', '祝': '祝', '著': '著', '築': '築', '灷': '灷', '篆': '篆', '丬': '⺦', '壮': '壮', '狀': '狀', '隹': '⾫', '衠': '衠', '琢': '琢', '鄑': '鄑', '椔': '椔', '嵫': '嵫', '滋': '滋', '緇': '緇', '子': '⼦', '自': '⾃', '朡': '朡', '縂': '縂', '辶': '⻌', '走': '⾛', '足': '⾜', '祖': '祖', '最': '最', '阝': '⻖', '㓁': '⺳', '䔫': '䔫', '㔾': '⺋', '㣺': '⺗', '飠': '⻟', '亅': '⼅', '亠': '⼇', '禸': '⽱', '〜': '~', '卄': '〹', '卅': '〺', 'へ': 'ヘ', '㖈': '䎛', '㘽': '㦳', '㬻': '䐠', '㩁': '搉', '㫚': '曶', '㬵': '胶', '㬺': '幐', '㮣': '槩', '䀿': '晣', '䃣': '䃣', '䑃': '朦', '䚶': '訞', '值': '値', '填': '塡', '墫': '壿', '媯': '嬀', '帡': '帲', '既': '既', '晚': '晩', '朌': '肦', '朏': '胐', '朐': '胊', '朓': '脁', '朘': '脧', '朣': '膧', '杮': '柿', '榝': '樧', '溈': '潙', '眞': '眞', '研': '硏', '礼': '礼', '絕': '絶', '胼': '腁', '芳': '芳', '蒍': '蔿', '蘒': '蘒', '蘷': '虁', '蟡': '蟡', '訮': '詽', '讆': '讏', '豜': '豣', '貫': '貫', '赿': '趆', '跺': '跥', '躗': '躛', '軿': '輧', '鎮': '鎭', '𣏕': '𣏕', '𥳐': '𥳐', '𪄅': '𪄅'} module-attribute

method: WMMethod = WMMethod.FIND_AND_REPLACE module-attribute

See examples in Homograph Chinese.

HOMOGRAPH_LETTERS

Homographs in letters

CONFUSABLES_CHARS: dict = {'A': 'ΑАᎪꓮ𝐀𝖠𝗔', 'B': 'ΒВᏴꓐ𝐁𝖡𝗕', 'C': 'ⅭCСᏟⲤꓚϹ', 'D': 'ⅮᗞᗪᎠꓓ𝐃𝖣', 'E': 'ⴹΕЕᎬꓰ𝐄𝖤', 'F': 'ᖴϜꓝ𝐅𝖥𝙵𝟊', 'G': 'Ꮐ𝙶ꓖ𝐆𝖦𝗚𝐺', 'H': 'ᕼΗНᎻⲎꓧ𝖧', 'I': 'ⅠΙІӀ𝐈𝙸𝚰', 'J': 'ᒍЈᎫ𝐉𝙹𝖩𝗝', 'K': 'KΚКᏦⲔꓗ𝐊', 'L': 'ⅬᒪᏞⳐꓡ𝐋𝙻', 'M': 'ⅯMΜМᎷꓟ𝐌', 'N': 'NΝⲚꓠ𝐍𝖭𝗡', 'O': 'ଠⵔՕⲞꓳ𝚶𝐎', 'P': 'ΡРᏢⲢꓑ𝐏𝖯', 'Q': '𝐐𝑄𝑸𝖰𝗤𝘘𝙌', 'R': 'ᎡᏒꓣ𝐑𝖱𝗥𝚁', 'S': 'ЅՏᏚꓢ𝖲𝗦𝚂', 'T': 'ΤТᎢꓔ𝖳𝗧𝚃', 'U': 'Սꓴ𝚄𝐔𝖴𝗨𝘜', 'V': 'ⅤᐯⴸᏙꓦ𝐕𝖵', 'W': 'ԜᎳꓪ𝐖𝖶𝗪𝘞', 'X': 'ΧХⲬⵝꓫ𐊐𐊴', 'Y': 'ΥҮⲨꓬ𝐘𝖸𝗬', 'Z': 'ΖᏃꓜꛉ𐕓𑢩Ⲍ', 'a': 'аɑαᥲ⍺𐓟ꭤ', 'b': 'ᖯЬᏏ𝐛𝖻𝗯𝚋', 'c': 'ϲсᥴᴄⅽⲥ𐔛', 'd': 'ⅾᑯꓒ𝐝𝖽𝗱𝙙', 'e': 'еℯ𝐞𝖾𝗲𝘦𝙚', 'f': 'ẝ𝐟𝕗𝖿𝗳𝙛𝘧', 'g': 'ɡց𝐠𝑔𝒈𝗀𝗴', 'h': 'һᏂ𝐡𝕙𝗁𝗵𝚑', 'i': 'іᎥ𝐢𝕚𝗂𝗶𝚒', 'j': 'ј𝚓ϳ𝐣𝕛𝗃𝗷', 'k': '𝐤𝗄𝗸𝙠𝚔𝑘𝒌', 'l': '𝑙𝒍𝓁𝓵𝗅𝗹𝙡', 'm': 'ⅿ𝐦𝗆𝗺𝘮𝙢𝑚', 'n': 'ո𝐧𝗇𝗻𝚗𝘯𝙣', 'o': 'οоᴏⲟ𐓪օ௦', 'p': 'рⲣ𝐩𝗉𝗽𝚙𝑝', 'q': 'ԛգզ𝐪𝗊𝗾𝚚', 'r': '𝚛𝐫𝒓𝓇𝓻𝗿𝗋', 's': '᥉ѕꮪꜱ𝚜𝐬𝗌', 't': '𝚝𝑡𝓉𝓽𝗍𝘵𝙩', 'u': 'ᴜս𝐮𝗎𝘂𝚞𝑢', 'v': 'ᴠⅴνѵ𝐯∨𝝼', 'w': 'ᴡԝ𝐰𝗐𝘄𝘸𝙬', 'x': 'ⅹх𝐱᙮𝗑𝘅𝘹', 'y': 'уꭹ𝐲𝒚𝗒𝘆𝚢', 'z': 'ᴢ𝐳𝑧𝗓𝘇𝘻𝙯'} module-attribute

method: WMMethod = WMMethod.FIND_AND_REPLACE module-attribute

See examples in Homograph letters.

HOMOGRAPH_NUMBERS

Homographs in numbers

CONFUSABLES_CHARS: dict = {'0': '᱐𝟘𝟎𝟢𝟬𝟶', '1': 'Ӏ𝟙𝟏𝟣𝟭𝟷', '2': 'ᒿ𝟚𝟐𝟤𝟮𝟸', '3': 'Ⳍ𝟛𝟑𝟥𝟯𝟹', '4': 'Ꮞ𝟜𝟒𝟦𝟰𝟺', '5': 'Ƽ𝟝𝟓𝟧𝟱𝟻', '6': 'Ⳓ𝟞𝟔𝟨𝟲𝟼', '7': 'ገ𝟟𝟕𝟩𝟳𝟽', '8': '৪𝟠𝟖𝟪𝟴𝟾', '9': 'Ꝯ𝟡𝟗𝟫𝟵𝟿', '.': '٠۰ꓸ․ͺ᎐'} module-attribute

method: WMMethod = WMMethod.FIND_AND_REPLACE module-attribute

See examples in Homograph numbers.

HOMOGRAPH_PUNCTUATIONS

Homographs in Punctuations

CONFUSABLES_CHARS: dict = {'!': 'ǃ!', '"': 'ʺ"', '%': '٪⁒', "'": 'ꞌ᾽', '*': '⁎∗', ',': '٫‚', '-': '‐‑', '.': 'ꓸ․', '/': 'Ⳇ∕', ':': '˸∶', '?': 'ʔॽ', ';': ';;', '\\': '∖⧵', '~': '⁓∼', '‧': '··', '¯': 'ˉ‾'} module-attribute

method: WMMethod = WMMethod.FIND_AND_REPLACE module-attribute

See examples in Homograph punctuations.

HTML_EMPTY_TAGS

HTML empty tags template can only be used when the text can be displayed in HTML mode. Such as WEB page, Blog, EMail, etc.

All the tags below are inline tags.

Some of HTML editor will remove empty or outside of list tags.

Therefore, this template is not a relatively stable template, and it is not recommended to use it in most cases.

CONFUSABLES_CHARS: list = ['<a></a>', '<abbr></abbr>', '<b></b>', '<bdo></bdo>', '<big></big>', '<cite></cite>', '<code></code>', '<dfn></dfn>', '<em></em>', '<i></i>', '<kbd></kbd>', '<var></var>', '<samp></samp>', '<span></span>', '<strong></strong>', '<small></small>', '<sub></sub>', '<sup></sup>', '<tt></tt>', '<u></u>'] module-attribute

method: WMMethod = WMMethod.INSERT_INTO_POSITION module-attribute

See examples in HTML empty tags.

INVISIBLE_CHARS

Watermark template of invisible chars.

All of the chars below are invisible on most of the text editors and WEB view.

In most cases, using this template is a pretty good choice.

method: WMMethod = WMMethod.INSERT_INTO_POSITION module-attribute

Python
"""Watermark template of invisible chars.

All of the chars below are invisible on most of the text editors and WEB view.

In most cases, using this template is a pretty good choice.
"""

from ..defines import WMMethod

CONFUSABLES_CHARS: list = [
    "\u034f",
    "\u180b",
    "\u180c",
    "\u180d",
    "\u180e",
    "\u200b",
    "\u200e",
    "\u202a",
    "\u202b",
    "\u202c",
    "\u202d",
    "\ufe00",
    "\ufe01",
    "\ufe02",
    "\ufe03",
    "\ufe04",
    "\ufe05",
    "\ufe06",
    "\ufe07",
    "\ufe08",
    "\ufe09",
    "\ufe0a",
    "\ufe0b",
    "\ufe0c",
    "\ufe0d",
    "\ufe0e",
]

method: WMMethod = WMMethod.INSERT_INTO_POSITION

See examples in Invisible characters.

SPACE_CHARS

This template will replace the regular space char with the other width of space chars.

Since spaces are rare in Chinese, this template is mainly suitable for English text.

method: WMMethod = WMMethod.FIND_AND_REPLACE module-attribute

Python
"""
This template will replace the regular space char with the other width of space chars.

Since spaces are rare in Chinese, this template is mainly suitable for English text.
"""

from ..defines import WhiteSpaceChars, WMMethod

# 空格字符
CONFUSABLES_CHARS: dict = {
    "\u0020": [
        WhiteSpaceChars.SPACE_1_4.value,
        # WhiteSpaceChars.NO_BREAK_SPACE_1_4.value,
        # WhiteSpaceChars.EN_QUAD_1_2.value,
        # WhiteSpaceChars.EM_QUAD_1.value,
        WhiteSpaceChars.EN_SPACE_1_2.value,
        WhiteSpaceChars.EM_SPACE_1.value,
        WhiteSpaceChars.THREE_PER_EM_SPACE_1_3.value,
        # WhiteSpaceChars.FOUR_PER_EM_SPACE_1_4.value,
        WhiteSpaceChars.SIX_PER_EM_SPACE_1_6.value,
        # WhiteSpaceChars.FIGURE_SPACE_LIKE_DIGITS.value,
        # WhiteSpaceChars.PUNCTUATION_SPACE_LIKE_DOT.value,
        # WhiteSpaceChars.THIN_SPACE_1_6.value,
        WhiteSpaceChars.HAIR_SPACE_1_8.value,
        # WhiteSpaceChars.NARROW_NO_BREAK_SPACE_1_6.value,
        # WhiteSpaceChars.MEDIUM_MATHEMATICAL_SPACE_2_9.value,
    ]
}

method: WMMethod = WMMethod.FIND_AND_REPLACE

See examples in Space characters.

WHITESPACE_CHARS

The template will generate a watermark into many types of space chars and then insert it into the specified location.

The best usage scenario for this template is to insert the watermark on an empty line of text or after some lines in the code.

method: WMMethod = WMMethod.INSERT_INTO_POSITION module-attribute

Python
"""
The template will generate a watermark into many types of space chars 
and then insert it into the specified location.

The best usage scenario for this template is to insert the watermark on 
an empty line of text or after some lines in the code.
"""

from ..defines import WhiteSpaceChars, WMMethod

# 空格字符
CONFUSABLES_CHARS: list = [
    # WhiteSpaceChars.SPACE_1_4.value,
    WhiteSpaceChars.NO_BREAK_SPACE_1_4.value,
    WhiteSpaceChars.EN_QUAD_1_2.value,
    WhiteSpaceChars.EM_QUAD_1.value,
    WhiteSpaceChars.EN_SPACE_1_2.value,
    WhiteSpaceChars.EM_SPACE_1.value,
    WhiteSpaceChars.THREE_PER_EM_SPACE_1_3.value,
    WhiteSpaceChars.FOUR_PER_EM_SPACE_1_4.value,
    WhiteSpaceChars.SIX_PER_EM_SPACE_1_6.value,
    WhiteSpaceChars.FIGURE_SPACE_LIKE_DIGITS.value,
    WhiteSpaceChars.PUNCTUATION_SPACE_LIKE_DOT.value,
    WhiteSpaceChars.THIN_SPACE_1_6.value,
    WhiteSpaceChars.HAIR_SPACE_1_8.value,
    WhiteSpaceChars.NARROW_NO_BREAK_SPACE_1_6.value,
    WhiteSpaceChars.MEDIUM_MATHEMATICAL_SPACE_2_9.value,
]


method: WMMethod = WMMethod.INSERT_INTO_POSITION

See examples in Whitespace characters.