pyClock城市显示中文字库添加

pyClock城市显示中文字库添加

pyClock天气时钟支持全国2000多个城市,利用城市编码表查询天气信息,但中文没有使用通用字库,因此部分城市如何还没有字库就不会显示城市名称,只显示城市编码。

城市中文字库文件位于:出厂例程\data\Fonts\fonts_city.py

如果你所在城市还没有在字库里面,请在评论区回复城市名称,我们将定期更新进字库文件。
( 大家也可以参考教程自行添加: 01Studio全系列LCD 中文显示 - MicroPython - 01科技 | 01Studio

=============

2022-6-21 版本:(附件供下载,如无法下载请登录后下载。)

已支持全国所有城市。中文数量1073个,组合城市2444个。

=============

2022-6-17 版本:(附件供下载,如无法下载请登录后下载。)

字符个数: 92
[‘北’, ‘京’, ‘海’, ‘阳’, ‘通’, ‘州’, ‘昌’, ‘平’, ‘丰’, ‘台’, ‘石’, ‘景’, ‘山’, ‘大’, ‘兴’, ‘云’, ‘门’, ‘佛’, ‘河’, ‘上’, ‘定’, ‘南’, ‘金’, ‘青’, ‘浦’, ‘江’, ‘东’, ‘天’, ‘津’, ‘武’, ‘清’, ‘西’, ‘宁’, ‘汉’, ‘港’, ‘县’, ‘永’, ‘川’, ‘巴’, ‘长’, ‘龙’, ‘陵’, ‘城’, ‘溪’, ‘都’, ‘水’, ‘哈’, ‘尔’, ‘滨’, ‘兰’, ‘阿’, ‘齐’, ‘安’, ‘克’, ‘林’, ‘原’, ‘远’, ‘化’, ‘中’, ‘新’, ‘春’, ‘乌’, ‘源’, ‘德’, ‘惠’, ‘和’, ‘白’, ‘镇’, ‘临’, ‘沈’, ‘阜’, ‘旗’, ‘高’, ‘太’, ‘锡’, ‘日’, ‘黄’, ‘济’, ‘湖’, ‘深’, ‘无’, ‘乐’, ‘曲’, ‘坊’, ‘香’, ‘广’, ‘成’, ‘宜’, ‘潍’, ‘照’, ‘澳’, ‘圳’]

支持城市: 448

[‘北京’, ‘通州’, ‘昌平’, ‘丰台’, ‘石景山’, ‘大兴’, ‘上海’, ‘金山’, ‘青浦’, ‘浦东’, ‘天津’, ‘武清’, ‘西青’, ‘宁河’, ‘津南’, ‘大港’, ‘永川’, ‘南川’, ‘江津’, ‘巴南’, ‘云阳’, ‘丰都’, ‘哈尔滨’, ‘阿城’, ‘通河’, ‘齐齐哈尔’, ‘龙江’, ‘克山’, ‘克东’, ‘海林’, ‘宁安’, ‘东宁’, ‘兰西’, ‘北安’, ‘新林’, ‘长春’, ‘德惠’, ‘和龙’, ‘通化’, ‘通化县’, ‘白城’, ‘大安’, ‘东丰’, ‘白山’, ‘临江’, ‘长白’, ‘沈阳’, ‘金州’, ‘长海’, ‘台安’, ‘海城’, ‘清原’, ‘东港’, ‘北宁’, ‘北镇’, ‘阜新’, ‘西丰’, ‘兴城’, ‘清水河’, ‘武川’, ‘乌海’, ‘化德’, ‘兴和’, ‘丰镇’, ‘青龙山’, ‘林西’, ‘宁城’, ‘河南’, ‘临河’, ‘阿尔山’, ‘平山’, ‘新乐’, ‘阜平’, ‘高阳’, ‘安新’, ‘曲阳’, ‘定州’, ‘阳原’, ‘丰宁’, ‘丰南’, ‘永清’, ‘香河’, ‘大城’, ‘青县’, ‘海兴’, ‘安平’, ‘景县’, ‘阜城’, ‘深州’, ‘临城’, ‘南和’, ‘新河’, ‘清河’, ‘临西’, ‘成安’, ‘广平’, ‘武安’, ‘青龙’, ‘太原’, ‘阳曲’, ‘阳高’, ‘天镇’, ‘平定’, ‘阳城’, ‘陵川’, ‘高平’, ‘永和’, ‘大宁’, ‘河津’, ‘永济’, ‘河曲’, ‘宁武’, ‘原平’, ‘临县’, ‘兴县’, ‘中阳’, ‘西安’, ‘长安’, ‘高陵’, ‘长武’, ‘兴平’, ‘宜川’, ‘黄陵’, ‘黄龙’, ‘白水’, ‘山阳’, ‘镇安’, ‘白河’, ‘汉中’, ‘镇巴’, ‘太白’, ‘济南’, ‘长清’, ‘济阳’, ‘高青’, ‘德州’, ‘武城’, ‘陵县’, ‘齐河’, ‘乐陵’, ‘平原’, ‘宁津’, ‘海阳’, ‘潍坊’, ‘青州’, ‘昌乐’, ‘济宁’, ‘曲阜’, ‘东平’, ‘宁阳’, ‘成武’, ‘滨州’, ‘日照’, ‘东阿’, ‘临清’, ‘新和’, ‘新源’, ‘和丰’, ‘哈巴河’, ‘青河’, ‘定日’, ‘山南’, ‘昌都’, ‘西宁’, ‘大通’, ‘海东’, ‘乐都’, ‘平安’, ‘黄南’, ‘河南’, ‘海南’, ‘兴海’, ‘清水河’, ‘海西’, ‘乌兰’, ‘都兰’, ‘海北’, ‘门源’, ‘兰州’, ‘定西’, ‘安定’, ‘宁县’, ‘镇原’, ‘金昌’, ‘永昌’, ‘高台’, ‘天水’, ‘清水’, ‘武山’, ‘武都’, ‘成县’, ‘西和’, ‘广河’, ‘永宁’, ‘中宁’, ‘海原’, ‘安阳’, ‘林州’, ‘原阳’, ‘新县’, ‘南阳’, ‘镇平’, ‘新安’, ‘宜阳’, ‘宁陵’, ‘永城’, ‘南乐’, ‘清丰’, ‘西平’, ‘济源’, ‘南京’, ‘江宁’, ‘江浦’, ‘无锡’, ‘宜兴’, ‘镇江’, ‘南通’, ‘海安’, ‘海门’, ‘通州’, ‘江都’, ‘滨海’, ‘阜宁’, ‘东台’, ‘大丰’, ‘丰县’, ‘金湖’, ‘东海’, ‘兴化’, ‘武汉’, ‘宜城’, ‘汉川’, ‘黄石’, ‘阳新’, ‘通城’, ‘通山’, ‘江陵’, ‘宜昌’, ‘远安’, ‘兴山’, ‘宜昌县’, ‘长阳’, ‘宜都’, ‘巴东’, ‘广水’, ‘京山’, ‘天门’, ‘临安’, ‘湖州’, ‘长兴’, ‘德清’, ‘海宁’, ‘平湖’, ‘宁海’, ‘镇海’, ‘新昌’, ‘台州’, ‘天台’, ‘临海’, ‘平阳’, ‘乐清’, ‘云和’, ‘景宁’, ‘浦江’, ‘兰溪’, ‘东阳’, ‘江山’, ‘定海’, ‘长丰’, ‘南陵’, ‘太湖’, ‘阜阳’, ‘阜南’, ‘太和’, ‘黄山’, ‘定远’, ‘天长’, ‘广德’, ‘和县’, ‘青阳’, ‘石台’, ‘长乐’, ‘宁德’, ‘安溪’, ‘永春’, ‘德化’, ‘南安’, ‘安溪’, ‘永春’, ‘德化’, ‘南安’, ‘平和’, ‘龙海’, ‘东山’, ‘武平’, ‘永定’, ‘宁化’, ‘永安’, ‘南平’, ‘浦城’, ‘南昌’, ‘南昌县’, ‘武宁’, ‘德安’, ‘都昌’, ‘德兴’, ‘广丰’, ‘广昌’, ‘乐安’, ‘金溪’, ‘宜黄’, ‘南城’, ‘南丰’, ‘宜春’, ‘宜丰’, ‘上高’, ‘高安’, ‘丰城’, ‘永丰’, ‘永新’, ‘宁都’, ‘石城’, ‘安远’, ‘龙南’, ‘定南’, ‘景德镇’, ‘乐平’, ‘临武’, ‘永兴’, ‘石门’, ‘南县’, ‘安化’, ‘新化’, ‘新宁’, ‘平江’, ‘永州’, ‘东安’, ‘宁远’, ‘江永’, ‘龙山’, ‘白云’, ‘清镇’, ‘镇宁’, ‘惠水’, ‘镇远’, ‘黄平’, ‘台江’, ‘德江’, ‘水城’, ‘安龙’, ‘成都’, ‘新都’, ‘新津’, ‘安县’, ‘北川’, ‘平武’, ‘广安’, ‘巴中’, ‘通江’, ‘南江’, ‘平昌’, ‘南溪’, ‘江安’, ‘长宁’, ‘高县’, ‘东兴’, ‘乐山’, ‘德昌’, ‘宁南’, ‘西昌’, ‘金阳’, ‘汉源’, ‘新龙’, ‘金川’, ‘德阳’, ‘中江’, ‘广汉’, ‘青川’, ‘广州’, ‘乐昌’, ‘新丰’, ‘曲江’, ‘惠州’, ‘惠阳’, ‘惠东’, ‘龙门’, ‘兴宁’, ‘平远’, ‘南澳’, ‘深圳’, ‘佛山’, ‘南海’, ‘广宁’, ‘江门’, ‘台山’, ‘河源’, ‘和平’, ‘龙川’, ‘清远’, ‘阳山’, ‘新兴’, ‘中山’, ‘阳江’, ‘阳春’, ‘高州’, ‘化州’, ‘海丰’, ‘东川’, ‘石林’, ‘安宁’, ‘云龙’, ‘永平’, ‘金平’, ‘龙陵’, ‘昌宁’, ‘广南’, ‘江川’, ‘通海’, ‘新平’, ‘武定’, ‘景东’, ‘江城’, ‘镇源’, ‘永德’, ‘云县’, ‘南宁’, ‘上林’, ‘龙州’, ‘大新’, ‘兴安’, ‘平乐’, ‘平南’, ‘西林’, ‘浦北’, ‘东兰’, ‘宜州’, ‘都安’, ‘北海’, ‘东兴’, ‘临高’, ‘昌江’, ‘定安’, ‘陵水’, ‘乐东’, ‘香港’, ‘澳门’, ‘台北’, ‘台中’]

=============

2022-6-10版本:

字符个数: 78
[‘北’, ‘京’, ‘海’, ‘阳’, ‘通’, ‘州’, ‘昌’, ‘平’, ‘丰’, ‘台’, ‘石’, ‘山’, ‘大’, ‘兴’, ‘云’, ‘门’, ‘佛’, ‘河’, ‘上’, ‘定’, ‘南’, ‘金’, ‘青’, ‘浦’, ‘江’, ‘东’, ‘天’, ‘武’, ‘清’, ‘西’, ‘宁’, ‘汉’, ‘港’, ‘县’, ‘永’, ‘川’, ‘巴’, ‘长’, ‘龙’, ‘陵’, ‘城’, ‘溪’, ‘都’, ‘水’, ‘尔’, ‘兰’, ‘阿’, ‘安’, ‘克’, ‘林’, ‘原’, ‘化’, ‘中’, ‘新’, ‘乌’, ‘源’, ‘德’, ‘惠’, ‘和’, ‘白’, ‘镇’, ‘临’, ‘沈’, ‘旗’, ‘高’, ‘太’, ‘锡’, ‘黄’, ‘湖’, ‘深’, ‘无’, ‘乐’, ‘曲’, ‘香’, ‘广’, ‘宜’, ‘澳’, ‘圳’]

支持城市: 400

[‘北京’, ‘通州’, ‘昌平’, ‘丰台’, ‘大兴’, ‘上海’, ‘金山’, ‘青浦’, ‘浦东’, ‘武清’, ‘西青’, ‘宁河’, ‘大港’, ‘永川’, ‘南川’, ‘巴南’, ‘云阳’, ‘丰都’, ‘阿城’, ‘通河’, ‘龙江’, ‘克山’, ‘克东’, ‘海林’, ‘宁安’, ‘东宁’, ‘兰西’, ‘北安’, ‘新林’, ‘德惠’, ‘和龙’, ‘通化’, ‘通化县’, ‘白城’, ‘大安’, ‘东丰’, ‘白山’, ‘临江’, ‘长白’, ‘沈阳’, ‘金州’, ‘长海’, ‘台安’, ‘海城’, ‘清原’, ‘东港’, ‘北宁’, ‘北镇’, ‘西丰’, ‘兴城’, ‘清水河’, ‘武川’, ‘乌海’, ‘化德’, ‘兴和’, ‘丰镇’, ‘青龙山’, ‘林西’, ‘宁城’, ‘河南’, ‘临河’, ‘阿尔山’, ‘平山’, ‘新乐’, ‘高阳’, ‘安新’, ‘曲阳’, ‘定州’, ‘阳原’, ‘丰宁’, ‘丰南’, ‘永清’, ‘香河’, ‘大城’, ‘青县’, ‘海兴’, ‘安平’, ‘深州’, ‘临城’, ‘南和’, ‘新河’, ‘清河’, ‘临西’, ‘广平’, ‘武安’, ‘青龙’, ‘太原’, ‘阳曲’, ‘阳高’, ‘天镇’, ‘平定’, ‘阳城’, ‘陵川’, ‘高平’, ‘永和’, ‘大宁’, ‘河曲’, ‘宁武’, ‘原平’, ‘临县’, ‘兴县’, ‘中阳’, ‘西安’, ‘长安’, ‘高陵’, ‘长武’, ‘兴平’, ‘宜川’, ‘黄陵’, ‘黄龙’, ‘白水’, ‘山阳’, ‘镇安’, ‘白河’, ‘汉中’, ‘镇巴’, ‘太白’, ‘长清’, ‘高青’, ‘德州’, ‘武城’, ‘陵县’, ‘乐陵’, ‘平原’, ‘海阳’, ‘青州’, ‘昌乐’, ‘东平’, ‘宁阳’, ‘东阿’, ‘临清’, ‘新和’, ‘新源’, ‘和丰’, ‘青河’, ‘山南’, ‘昌都’, ‘西宁’, ‘大通’, ‘海东’, ‘乐都’, ‘平安’, ‘黄南’, ‘河南’, ‘海南’, ‘兴海’, ‘清水河’, ‘海西’, ‘乌兰’, ‘都兰’, ‘海北’, ‘门源’, ‘兰州’, ‘定西’, ‘安定’, ‘宁县’, ‘镇原’, ‘金昌’, ‘永昌’, ‘高台’, ‘天水’, ‘清水’, ‘武山’, ‘武都’, ‘西和’, ‘广河’, ‘永宁’, ‘中宁’, ‘海原’, ‘安阳’, ‘林州’, ‘原阳’, ‘新县’, ‘南阳’, ‘镇平’, ‘新安’, ‘宜阳’, ‘宁陵’, ‘永城’, ‘南乐’, ‘清丰’, ‘西平’, ‘南京’, ‘江宁’, ‘江浦’, ‘无锡’, ‘宜兴’, ‘镇江’, ‘南通’, ‘海安’, ‘海门’, ‘通州’, ‘江都’, ‘东台’, ‘大丰’, ‘丰县’, ‘金湖’, ‘东海’, ‘兴化’, ‘武汉’, ‘宜城’, ‘汉川’, ‘黄石’, ‘阳新’, ‘通城’, ‘通山’, ‘江陵’, ‘宜昌’, ‘兴山’, ‘宜昌县’, ‘长阳’, ‘宜都’, ‘巴东’, ‘广水’, ‘京山’, ‘天门’, ‘临安’, ‘湖州’, ‘长兴’, ‘德清’, ‘海宁’, ‘平湖’, ‘宁海’, ‘镇海’, ‘新昌’, ‘台州’, ‘天台’, ‘临海’, ‘平阳’, ‘乐清’, ‘云和’, ‘浦江’, ‘兰溪’, ‘东阳’, ‘江山’, ‘定海’, ‘长丰’, ‘南陵’, ‘太湖’, ‘太和’, ‘黄山’, ‘天长’, ‘广德’, ‘和县’, ‘青阳’, ‘石台’, ‘长乐’, ‘宁德’, ‘安溪’, ‘德化’, ‘南安’, ‘安溪’, ‘德化’, ‘南安’, ‘平和’, ‘龙海’, ‘东山’, ‘武平’, ‘永定’, ‘宁化’, ‘永安’, ‘南平’, ‘浦城’, ‘南昌’, ‘南昌县’, ‘武宁’, ‘德安’, ‘都昌’, ‘德兴’, ‘广丰’, ‘广昌’, ‘乐安’, ‘金溪’, ‘宜黄’, ‘南城’, ‘南丰’, ‘宜丰’, ‘上高’, ‘高安’, ‘丰城’, ‘永丰’, ‘永新’, ‘宁都’, ‘石城’, ‘龙南’, ‘定南’, ‘乐平’, ‘临武’, ‘永兴’, ‘石门’, ‘南县’, ‘安化’, ‘新化’, ‘新宁’, ‘平江’, ‘永州’, ‘东安’, ‘江永’, ‘龙山’, ‘白云’, ‘清镇’, ‘镇宁’, ‘惠水’, ‘黄平’, ‘台江’, ‘德江’, ‘水城’, ‘安龙’, ‘新都’, ‘安县’, ‘北川’, ‘平武’, ‘广安’, ‘巴中’, ‘通江’, ‘南江’, ‘平昌’, ‘南溪’, ‘江安’, ‘长宁’, ‘高县’, ‘东兴’, ‘乐山’, ‘德昌’, ‘宁南’, ‘西昌’, ‘金阳’, ‘汉源’, ‘新龙’, ‘金川’, ‘德阳’, ‘中江’, ‘广汉’, ‘青川’, ‘广州’, ‘乐昌’, ‘新丰’, ‘曲江’, ‘惠州’, ‘惠阳’, ‘惠东’, ‘龙门’, ‘兴宁’, ‘南澳’, ‘深圳’, ‘佛山’, ‘南海’, ‘广宁’, ‘江门’, ‘台山’, ‘河源’, ‘和平’, ‘龙川’, ‘阳山’, ‘新兴’, ‘中山’, ‘阳江’, ‘高州’, ‘化州’, ‘海丰’, ‘东川’, ‘石林’, ‘安宁’, ‘云龙’, ‘永平’, ‘金平’, ‘龙陵’, ‘昌宁’, ‘广南’, ‘江川’, ‘通海’, ‘新平’, ‘武定’, ‘江城’, ‘镇源’, ‘永德’, ‘云县’, ‘南宁’, ‘上林’, ‘龙州’, ‘大新’, ‘兴安’, ‘平乐’, ‘平南’, ‘西林’, ‘浦北’, ‘东兰’, ‘宜州’, ‘都安’, ‘北海’, ‘东兴’, ‘临高’, ‘昌江’, ‘定安’, ‘陵水’, ‘乐东’, ‘香港’, ‘澳门’, ‘台北’, ‘台中’]

附件为所有2000+城市对应编码表:

CityCode.zip (16.4 KB)
fonts_city_2022-6-17.zip (6.3 KB)
fonts_city_2022-6-21.rar (67.1 KB)