[Talk-TW] 答复: 答复: 答复: 地圖中文字亂碼的问题

Jacarri Chan jacarrichan於live.com
Wed 3月 19 06:51:41 UTC 2014


Hi Cheers:

         $ python -c "import mapnik2;print mapnik2.fontscollectionpath" ,

         我執行了的,得到的結果是”/usr/share/fonts/truetype”,可以從以前發的圖片得到印證.

 

       

 

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

Jacarri Chan

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

 

发件人: Rex Tsai [mailto:rex.cc.tsai於gmail.com] 
发送时间: 2014年3月19日 14:47
收件人: Jacarri Chan
抄送: Louis Liu; OSM Taiwan
主题: Re: [Talk-TW] 答复: 答复: 地圖中文字亂碼的问题

 

Hi,

You can use the following command to check your font paths.
$ python -c "import mapnik2;print mapnik2.fontscollectionpath"

Cheers

-Rex

 

 

Jacarri Chan <jacarrichan於live.com> 於 2014年3月19日 下午12:31 寫道:

         我發現它使用的font檔是在/usr/share/fonts/truetype資料夾中。Libreoffice中能找到和樣式表中配置的同種字體。配置好並且系統重啟後,發現還是這樣。

 

 

 



 

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

Jacarri Chan

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

 

发件人: Louis Liu [mailto:pttdog於gmail.com] 
发送时间: 2014年3月19日 11:05

收件人: Jacarri Chan
抄送: OSM Taiwan

主题: Re: 答复: [Talk-TW] 地圖中文字亂碼的问题

 

Hi Jacarri,

你下載、匯入的指令是成功的,所以你才會看到地圖出現。
你要修改的是 Mapnik (把資料繪製成地圖的工具)的樣式表,這個樣式表決定了地圖繪製的外觀,文字要用什麼字型,字的大小和顏色也是由這個表所決定的。

Cheers,

Louis

 

Jacarri Chan <jacarrichan於live.com> 於 2014年3月19日 上午10:41 寫道:

Hi Louis:

 

我的OSM data是從這個位址裡面http://download.geofabrik.de/asia/taiwan.html下載的taiwan-latest.osm.pbf,然後用這個命令[osm2pgsql --slim -C 1500 --number-processes 4 taiwan-latest.osm.pbf]導入進去的,我這樣操作錯了?

 

 

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

Jacarri Chan

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

 

发件人: Louis Liu [mailto:pttdog於gmail.com] 
发送时间: 2014年3月19日 10:24
收件人: Jacarri Chan
抄送: OSM Taiwan
主题: Re: [Talk-TW] 地圖中文字亂碼的问题

 

Hi Jacarri,

你要在 style sheet 裡面設定字型,例如這樣:

<FontSet name="book-fonts">
  <Font face-name="DejaVu Sans Book" />
  <Font face-name="unifont Medium" />
</FontSet>

然後,Mapnik 所使用的字型檔案要放在特定的路徑內,用下列的指令可以查找到:

python -c "import mapnik;print mapnik.fontscollectionpath"

繪圖是個頗複雜的事情,加油!

Louis

 

Jacarri Chan <jacarrichan於live.com> 於 2014年3月19日 上午10:10 寫道:

Hi

我按照這個文檔操作時, ( http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/# <http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/>   ), 跑起來後發現地圖中文字是亂碼的。 但是資料庫。裡面卻是正常的,請問這個問題怎麼解決啊?

 



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

Jacarri Chan

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

 


_______________________________________________
Talk-TW mailing list
Talk-TW於openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-tw

 

 


_______________________________________________
Talk-TW mailing list
Talk-TW於openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-tw

 

-------------- 下一部份 --------------
抹去了一個 HTML 附加檔...
URL: <http://lists.openstreetmap.org/pipermail/talk-tw/attachments/20140319/8ca2ddac/attachment-0001.html>
-------------- 下一部份 --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 92988 bytes
Desc: 〔無法取得〕
URL: <http://lists.openstreetmap.org/pipermail/talk-tw/attachments/20140319/8ca2ddac/attachment-0003.png>
-------------- 下一部份 --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 808528 bytes
Desc: 〔無法取得〕
URL: <http://lists.openstreetmap.org/pipermail/talk-tw/attachments/20140319/8ca2ddac/attachment-0004.png>
-------------- 下一部份 --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 307173 bytes
Desc: 〔無法取得〕
URL: <http://lists.openstreetmap.org/pipermail/talk-tw/attachments/20140319/8ca2ddac/attachment-0005.png>


More information about the Talk-TW mailing list