Record the optimization process of simple and complex switching font

web front end four thousand one hundred and twenty-four Six years ago (2017-05-04)

In production zblog theme In order to increase the function of simple and complex switching, find a simple and complex font database data on the Internet. Because the zblog theme uses Microsoft Yahei typeface So some traditional and simplified characters are the same. In order to eliminate the same characters, the specific idea is to first modify the simplified and traditional characters to occupy a separate line for each character, then find the same item in two columns of data in Excel and delete it, and then restore the format through Sublime. The result is all the optimized characters,.

The detailed method is as follows:

1. First, copy and paste all simplified text into word, open "Find and Replace [Ctrl+H]", enter the search content (without double quotation marks): "^?", enter the replacement content: "^&^ p", click Replace All, and you will be prompted to complete 3756 replacements (if the format does not change after closing the replacement window, you can scroll up and down once), Copy and paste all the replaced text into column A of the Excel table.

2. Paste all traditional Chinese characters into column B of Excel table according to step 1.

3. Add the formula "=IF (COUNTIF (B: B, A1), IF (COUNTIF ($A $1: A1, A1)>COUNTIF (B: B, A1), A1," "), A1)" in the C1 cell of the Excel table, and add the formula "=IF (COUNTIF (A: A, B1), IF (COUNTIF ($B $1: B1, B1)>COUNTIF (A: A, B1), B1," "), B1)" in the D1 cell. Drop down and fill in the last row of AB to get all the different words in the comparison results.

4. Select C1 and D1 columns to copy, and right-click in the copied cell to select Paste as Value to clear the formula.

5. Select column C1, click the "Split" button in "Data" on the toolbar, and directly click Finish. Then operate column D1 in the same way, in order to clear the "false blank" cell generated by the formula (omitting this step will lead to positioning failure).

6. Select columns C1 and D1, open "Locate [Ctrl+G]", find the "Null Value" and click the locate button. Right click in the located cell to "Delete" - "Move the lower cell up".

7. Copy C1 column text to Sublime, press Shift+the right mouse button to locate in front of each line of text, and press Backspace to get all simplified characters in the normal format, and then operate D1 column in the same way to get all simplified traditional characters.