eatg75 Posted May 15, 2013 at 10:51 PM Report #507561 Posted May 15, 2013 at 10:51 PM (edited) Oi boa noite pessoal, estou com um problema com o fontconfig, criei um ficheiro de configuracao global (/etc/fonts/local.conf) para o fontconfig de acordo com as minhas preferencias e gostos, tenho uma instrucao em que substituio a fonte monospace por omissao por Aurulent Sans Mono SZ (que e uma modificacao minha da font eAurulent Sans Mono, tendo como diferenca um slash no carater 0), mas, o fontconfig nao faz o match corretamente e substitui a fonte mono por omissao por uma fonte variable width qualquer. Eis o meu ficheiro de configuracao : <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts/fonts.conf file to configure system font access --> <fontconfig> <!-- more custom fonts available to everyone --> <dir>/opt/my-precious-fonts</dir> <!-- replace this monospace font for the system's default monospace --> <match target="pattern"> <test qual="any" name="family"> <string>consolas</string> </test> <edit name="family" mode="assign" binding="same"> <string>monospace</string> </edit> </match> <!-- replace this monospace font for the system's default monospace --> <match target="pattern"> <test qual="any" name="family"> <string>bitstream vera sans mono</string> </test> <edit name="family" mode="assign" binding="same"> <string>monospace</string> </edit> </match> <!-- replace this monospace font for the system's default monospace --> <match target="pattern"> <test qual="any" name="family"> <string>monaco</string> </test> <edit name="family" mode="assign" binding="same"> <string>monospace</string> </edit> </match> <!-- replace this monospace font for the system's default monospace --> <match target="pattern"> <test qual="any" name="family"> <string>droid sans mono</string> </test> <edit name="family" mode="assign" binding="same"> <string>monospace</string> </edit> </match> <!-- make this font the default monospace font, NOTE: this instruction should be set after the above lines! --> <match target="pattern"> <test qual="any" name="family"> <string>monospace</string> </test> <edit name="family" mode="assign" binding="same"> <string>aurulent sans mono sz</string> </edit> </match> <!-- make applications use sans-serif fonts instead of serif one's --> <match target="pattern"> <test qual="any" name="family"> <string>serif</string> </test> <edit name="family" mode="assign" binding="same"> <string>sans-serif</string> </edit> </match> <!-- make this font the default sans-serif font --> <match target="pattern"> <test qual="any" name="family"> <string>sans-serif</string> </test> <edit name="family" mode="assign" binding="same"> <string>cantarell</string> </edit> </match> <match target="font"> <edit name="hinting" mode="assign"> <bool>true</bool> </edit> <edit name="hintstyle" mode="assign"> <const>hintslight</const> </edit> <edit name="autohint" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>true</bool> </edit> <edit name="rgba" mode="assign"> <const>rgb</const> </edit> <edit name="lcdfilter" mode="assign"> <const>lcddefault</const> </edit> </match> </fontconfig> Alguem poderia me ajudar? EDIT x2: alterei a identacao. Edited May 15, 2013 at 11:00 PM by eatg75 Victarion seized the dusky woman by the wrist and pulled her to him. Victarion - She will do it. Go pray to your red god. Light your fire, and tell me what you see. Moqorro's dark eyes seemed to shine. Moqorro - I see dragons.
Rui Carlos Posted May 16, 2013 at 11:49 AM Report #507619 Posted May 16, 2013 at 11:49 AM Não consegues escolher as fontes por omissão através do interface gráfico? É capaz de ser mais fiável. Rui Carlos Gonçalves
eatg75 Posted May 19, 2013 at 08:42 AM Author Report #507959 Posted May 19, 2013 at 08:42 AM O fontconfig e uma feramenta que permite configurar fontes de forma global para todas as applicacoes que utilizam o freetype2, pode-se configurar parametros os quais seram utilizados depois pelo freetype2 para desenhar as fontes, pode-se configurar uma panoplia de parametros, assim como rejeitar fontes dependendo de varios parametros, assim como fazer a substituicao de fontes por outras (que e o que estou tentando alcansar). Por exemplo aqui no P@P a classe de CSS para enfeitar o codigo tem como as duas fontes principais o Consolas e o Monaco, exatamente nessa ordem, suponhamos que nao tinha a fonte Consolas instalada e tivesse o Monaco instalado, o meu browser iria perguntar ao fontconfig para lhe dar o caminho para fonte Monaco, o fontconfig assegura a fonte existe e fornece o caminho no disco e o broweser desenha o texto utilizando essa fonte. Suponhamos que eu nao gostasse dessa fonte, entao configuraria o fontconfig para substituir essa fonte por outra do meu gosto, e ja esta. Com o fontconfig posso substituir varias fontes por uma a meu gosto de forma a ter uma experienca consistente em relacao a fontes em varias sites, browser, ides, editores de texto, etc. ao invez de estar a configurar cada uma delas. Victarion seized the dusky woman by the wrist and pulled her to him. Victarion - She will do it. Go pray to your red god. Light your fire, and tell me what you see. Moqorro's dark eyes seemed to shine. Moqorro - I see dragons.
Rui Carlos Posted May 19, 2013 at 10:23 AM Report #507962 Posted May 19, 2013 at 10:23 AM Não percebi bem o ponto do teu post. Em todo o caso, o meu comentário foi por causa de me lembrar de ver no Linux preferências de sistema para fontes. No caso do Debian 6, que é o que tenho instalado, tenho acesso às mesmas em System > Preferences > Appearance > Fonts. Rui Carlos Gonçalves
eatg75 Posted May 19, 2013 at 11:46 AM Author Report #507970 Posted May 19, 2013 at 11:46 AM E porque nao sabes para que serve o fontconfig e nao sabes como funcionam as fontes! Aquilo que se faz editando o(s) de configuracao do fonconfig nenhuma front end consegue fazer (nem KDE Settings ou o Gnome Preferences). Suponhamos que estas na China e e falas e escreves somente em mandarin e acabaste de instalar a tua distribuicao Linux preferida e vesitas um site em mandarin ou um outro idioma qualquer e as folhas de estilo para aquilo por infelicidade escolherem como fontes para a declaracao de font-family ou font uma fonte que nao suporta o Unicode e exista no teu disco o rendering engine do teu browser ira desenhar os carateres que nao existem nessa fonte como quadrados, com o fonte config podes configurar isso de forma a nao ter esta inconviniencia. Suponhamos que nao queres que nenhuma fonte bitmap fornecida a nenhuma aplicacao podes configurar o fontconfig de forma a que isso seja posivel. A tarrefa mais deficil, mais cansativa e que consome mais tempo a um designer de fontes no processo de criacao de uma fonte e a de font hinting pois ele de manualmente configurar isso, por esta mesma razao alguns designers deixam esta tarrefa por fazer. E como o freetype2 ira desenhar estas fontes se o byte-code interpreter nao esta presente no ficheiro da fonte, se souberes quais as fontes que caiem nessa categoria podes configura-las uma a uma para utilizar o funcionalide autohint do freetype2. Victarion seized the dusky woman by the wrist and pulled her to him. Victarion - She will do it. Go pray to your red god. Light your fire, and tell me what you see. Moqorro's dark eyes seemed to shine. Moqorro - I see dragons.
Rui Carlos Posted May 19, 2013 at 07:45 PM Report #507997 Posted May 19, 2013 at 07:45 PM É natural que os ficheiros de configuração te dêem mais opções que as UI gráficas do SO. Mas não me pareceu que para a tarefa que indicaste no primeiro post (substituir a fonte monospace por omissão) fosse necessário ir aos ficheiros de configuração. (Também posso ter sido eu a perceber mal o problema...) Rui Carlos Gonçalves
eatg75 Posted May 19, 2013 at 07:50 PM Author Report #507998 Posted May 19, 2013 at 07:50 PM Nenhuma fronted que existe premite fazer isso. Experimenta ir a Preferences > Apearence > Fonts e tenta substituir o Consolas por DejaVu Sans Mono. Victarion seized the dusky woman by the wrist and pulled her to him. Victarion - She will do it. Go pray to your red god. Light your fire, and tell me what you see. Moqorro's dark eyes seemed to shine. Moqorro - I see dragons.
Rui Carlos Posted May 19, 2013 at 09:40 PM Report #508007 Posted May 19, 2013 at 09:40 PM Tenho a opção para escolher a Fixed width font. Fiquei com a ideia que era isso que pretendias. Rui Carlos Gonçalves
Solution eatg75 Posted June 24, 2013 at 04:22 PM Author Solution Report #514759 Posted June 24, 2013 at 04:22 PM (edited) Descobri a algumas semanas atras que o problema estava nas metadatas da fonte em si e nao a configuracao do fontconfig. Edited June 24, 2013 at 04:32 PM by eatg75 Victarion seized the dusky woman by the wrist and pulled her to him. Victarion - She will do it. Go pray to your red god. Light your fire, and tell me what you see. Moqorro's dark eyes seemed to shine. Moqorro - I see dragons.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now