Hallo Winfried, und alle anderen.
komma4 hat geschrieben:
Du kannst dem Anwender generell einen Hinweis geben, dass er die Schrift ändern soll, wenn nichts zu lesen ist (oder der Dialog nicht wie in der als PDF

mitgelieferten Dokumentation abgebildet aussieht)
Eine Doku kommt natürlich auch noch dran
-{davor graut mir noch mehr als vor den Makro Problemen}-. Dort werd ich dann meine gesammelten Informationen die das "Layout" beeinflussen können genauer auflisten. Und das sind momentan nicht grad wenige.
Aber jetzt ist erstmal für mich das Thread-Thema wichtig, damit ich voran komme.
Und nun ein Danke schön für dein Kommandozeilen-Befehl.
Ich bin jetzt einen kleinen Schritt weiter, der mir aber momentan nicht sehr viel hilft.
Auf dem Fedora PC habe ich nun herausgefunden wo die Einstellungen für
-> Schriftart in Anwendungen gespeichert werden.
Aber so wirklich hilfreich ist das noch immer nicht, denn bei einer Änderung der Schriftart bekomme ich noch immer nicht das gewünschte Ergebnis. Hier die Ausgangslage der
%gconf.xml (auszugsweise).
Code: Alles auswählen
<?xml version="1.0"?>
<gconf>
<entry name="font_name" mtime="1310646419" type="string">
<stringvalue>Sans 10</stringvalue>
</entry>
[...]
</gconf>
Und bei Änderung auf Schriftart "Nimbus Sans L 11" ändert sich nur der Schriftart-Name (und die mtime).
Code: Alles auswählen
<?xml version="1.0"?>
<gconf>
<entry name="font_name" mtime="1310645848" type="string">
<stringvalue>Nimbus Sans L 11</stringvalue>
</entry>
[...]
</gconf>
Und so gesehen bringt mir das ganze wohl momentan gar nichts.
Also hatte ich zwischenzeitlich mal ein bisschen im WWW recherchiert, aber nur mit einem winzig kleinen Erfolg. Denn jetzt weiß ich durch eine PDF-Datei, dass das mit der eingestellten Systemschrift noch umfangreicher ist, als gedacht.
Die Zentrale Anlaufstelle dafür wäre nämlich eigentlich die
fonts.conf unter
/etc/fonts/. So steht es dort. Und diese Datei sollte dann ungefähr so aussehen, auszugsweise.
Code: Alles auswählen
<!--
Provide required aliases for standard names
-->
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
...
...
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>Tahoma</family>
...
...
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Bitstream Vera Sans Mono</family>
...
...
</prefer>
</alias>
Okay, die Datei habe ich auch gefunden, aber sie hat überhaupt keine Ähnlichkeit mit dem gezeigten Beispiel. Denn in der finde ich wohl als erstes einen Hinweis darauf, das diese Datei nicht geändert werden darf, und stattdessen eine
local.conf gilt. So fern ich mich nicht vertue.
fonts.conf hat geschrieben:
DO NOT EDIT THIS FILE.
IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
LOCAL CHANGES BELONG IN 'local.conf'.
Ferner steht dort auch nur folgendes, bezüglich der Schrtarten (auszugsweise).
fonts.conf hat geschrieben:
Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>
<!--
Also habe ich mir jetzt auch noch mal die local.conf, genauer gesagt die
51-local.conf angeschaut. Mit folgendem Ergebnis. Diesmal der gesamte Inhalt!
51-local.conf hat geschrieben:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Load local system customization file -->
<include ignore_missing="yes">local.conf</include>
</fontconfig>
Aber auch das bringt mich nicht weiter. Also hab ich mir noch die
fonts.dtd mal kurz angeschaut.
Hier ungekürzt.
Code: Alles auswählen
<!-- This is the Document Type Definition for font configuration files -->
<!ELEMENT fontconfig (dir |
cache |
cachedir |
include |
config |
selectfont |
match |
alias)* >
<!--
Add a directory that provides fonts
-->
<!ELEMENT dir (#PCDATA)>
<!ATTLIST dir xml:space (default|preserve) 'preserve'>
<!--
Define the per-user file that holds cache font information.
If the filename begins with '~', it is replaced with the users
home directory path.
-->
<!ELEMENT cache (#PCDATA)>
<!ATTLIST cache xml:space (default|preserve) 'preserve'>
<!--
Add a directory that is searched for font cache files.
These hold per-directory cache data and are searched in
order for each directory. When writing cache files, the first
directory which allows the cache file to be created is used.
A leading '~' in a directory name is replaced with the users
home directory path.
-->
<!ELEMENT cachedir (#PCDATA)>
<!ATTLIST cachedir xml:space (default|preserve) 'preserve'>
<!--
Reference another configuration file; note that this
is another complete font configuration file and not
just a file included by the XML parser.
Set 'ignore_missing' to 'yes' if errors are to be ignored.
If the filename begins with '~', it is replaced with the users
home directory path.
-->
<!ELEMENT include (#PCDATA)>
<!ATTLIST include
ignore_missing (no|yes) "no"
xml:space (default|preserve) "preserve">
<!--
Global library configuration data
-->
<!ELEMENT config (blank|rescan)*>
<!--
Specify the set of Unicode encoding values which
represent glyphs that are allowed to contain no
data. With this list, fontconfig can examine
fonts for broken glyphs and eliminate them from
the set of valid Unicode chars. This idea
was borrowed from Mozilla
-->
<!ELEMENT blank (int)*>
<!--
Aliases are just a special case for multiple match elements
They are syntactically equivalent to:
<match>
<test name="family">
<string value=[family]/>
</test>
<edit name="family" mode="prepend">
<string value=[prefer]/>
...
</edit>
<edit name="family" mode="append">
<string value=[accept]/>
...
</edit>
<edit name="family" mode="append_last">
<string value=[default]/>
...
</edit>
</match>
-->
<!--
Periodically rescan the font configuration and
directories to synch internal state with filesystem
-->
<!ELEMENT rescan (int)>
<!--
Edit list of available fonts at startup/reload time
-->
<!ELEMENT selectfont (rejectfont | acceptfont)* >
<!ELEMENT rejectfont (glob | pattern)*>
<!ELEMENT acceptfont (glob | pattern)*>
<!ELEMENT glob (#PCDATA)>
<!ELEMENT pattern (patelt)*>
<!ENTITY % constant 'int|double|string|matrix|bool|charset|const'>
<!ELEMENT patelt (%constant;)*>
<!ATTLIST patelt
name CDATA #REQUIRED>
<!ELEMENT alias (family*, prefer?, accept?, default?)>
<!ATTLIST alias
binding (weak|strong|same) "weak">
<!ELEMENT prefer (family)*>
<!ELEMENT accept (family)*>
<!ELEMENT default (family)*>
<!ELEMENT family (#PCDATA)>
<!ATTLIST family xml:space (default|preserve) 'preserve'>
<!ENTITY % expr 'int|double|string|matrix|bool|charset
|name|const
|or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains
|plus|minus|times|divide|not|if|floor|ceil|round|trunc'>
<!--
Match and edit patterns.
If 'target' is 'pattern', execute the match before selecting a font.
if 'target' is 'font', execute the match on the result of a font
selection.
-->
<!ELEMENT match (test*, edit*)>
<!ATTLIST match
target (pattern|font|scan) "pattern">
<!--
Match a field in a pattern
if 'qual' is 'any', then the match succeeds if any value in the field matches.
if 'qual' is 'all', then the match succeeds only if all values match.
if 'qual' is 'first', then the match succeeds only if the first value matches.
if 'qual' is 'not_first', then the match succeeds only if any value other than
the first matches.
For match elements with target=font, if test 'target' is 'pattern',
then the test is applied to the pattern used in matching rather than
to the resulting font.
Match elements with target=scan are applied as fonts are scanned.
They edit the pattern generated from the scanned font and affect
what the fontconfig database contains.
-->
<!ELEMENT test (%expr;)*>
<!ATTLIST test
qual (any|all|first|not_first) "any"
name CDATA #REQUIRED
target (pattern|font|default) "default"
compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains) "eq">
<!--
Edit a field in a pattern
The enclosed values are used together to edit the list of values
associated with 'name'.
If 'name' matches one of those used in a test element for this match element:
if 'mode' is 'assign', replace the matched value.
if 'mode' is 'assign_replace', replace all of the values
if 'mode' is 'prepend', insert before the matched value
if 'mode' is 'append', insert after the matched value
if 'mode' is 'prepend_first', insert before all of the values
if 'mode' is 'append_last', insert after all of the values
If 'name' doesn't match any of those used in a test element:
if 'mode' is 'assign' or 'assign_replace, replace all of the values
if 'mode' is 'prepend' or 'prepend_first', insert before all of the values
if 'mode' is 'append' or 'append_last', insert after all of the values
-->
<!ELEMENT edit (%expr;)*>
<!ATTLIST edit
name CDATA #REQUIRED
mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"
binding (weak|strong|same) "weak">
<!--
Elements of expressions follow
-->
<!ELEMENT int (#PCDATA)>
<!ATTLIST int xml:space (default|preserve) 'preserve'>
<!ELEMENT double (#PCDATA)>
<!ATTLIST double xml:space (default|preserve) 'preserve'>
<!ELEMENT string (#PCDATA)>
<!ATTLIST string xml:space (default|preserve) 'preserve'>
<!ELEMENT matrix (double,double,double,double)>
<!ELEMENT bool (#PCDATA)>
<!ELEMENT charset (#PCDATA)>
<!ATTLIST charset xml:space (default|preserve) 'preserve'>
<!ELEMENT name (#PCDATA)>
<!ATTLIST name xml:space (default|preserve) 'preserve'>
<!ELEMENT const (#PCDATA)>
<!ATTLIST const xml:space (default|preserve) 'preserve'>
<!ELEMENT or (%expr;)*>
<!ELEMENT and (%expr;)*>
<!ELEMENT eq ((%expr;), (%expr;))>
<!ELEMENT not_eq ((%expr;), (%expr;))>
<!ELEMENT less ((%expr;), (%expr;))>
<!ELEMENT less_eq ((%expr;), (%expr;))>
<!ELEMENT more ((%expr;), (%expr;))>
<!ELEMENT more_eq ((%expr;), (%expr;))>
<!ELEMENT contains ((%expr;), (%expr;))>
<!ELEMENT not_contains ((%expr;), (%expr;))>
<!ELEMENT plus (%expr;)*>
<!ELEMENT minus (%expr;)*>
<!ELEMENT times (%expr;)*>
<!ELEMENT divide (%expr;)*>
<!ELEMENT not (%expr;)>
<!ELEMENT if ((%expr;), (%expr;), (%expr;))>
<!ELEMENT floor (%expr;)>
<!ELEMENT ceil (%expr;)>
<!ELEMENT round (%expr;)>
<!ELEMENT trunc (%expr;)>
Und nun habe ich keinen Durchblick mehr. Hab jetzt vollends die Orientierung verloren

.
So wie ich es mir vorgestellt hatte, geht es nicht. Es gibt keine "einfache" Methode die System-Schrift auszulesen. Ich gebs auf.
Gruß
balu
Hallo Winfried, und alle anderen.
[quote="komma4"]
Du kannst dem Anwender generell einen Hinweis geben, dass er die Schrift ändern soll, wenn nichts zu lesen ist (oder der Dialog nicht wie in der als PDF :wink: mitgelieferten Dokumentation abgebildet aussieht)
[/quote]
Eine Doku kommt natürlich auch noch dran [i]-{davor graut mir noch mehr als vor den Makro Problemen}-[/i]. Dort werd ich dann meine gesammelten Informationen die das "Layout" beeinflussen können genauer auflisten. Und das sind momentan nicht grad wenige.
Aber jetzt ist erstmal für mich das Thread-Thema wichtig, damit ich voran komme.
Und nun ein Danke schön für dein Kommandozeilen-Befehl.
Ich bin jetzt einen kleinen Schritt weiter, der mir aber momentan nicht sehr viel hilft.
Auf dem Fedora PC habe ich nun herausgefunden wo die Einstellungen für [color=#0000FF]-> Schriftart in Anwendungen[/color] gespeichert werden.
[code]
./.gconf/desktop/gnome/interface/%gconf.xml
[/code]
Aber so wirklich hilfreich ist das noch immer nicht, denn bei einer Änderung der Schriftart bekomme ich noch immer nicht das gewünschte Ergebnis. Hier die Ausgangslage der [color=#008000][b]%gconf.xml[/b][/color] (auszugsweise).
[code]
<?xml version="1.0"?>
<gconf>
<entry name="font_name" mtime="1310646419" type="string">
<stringvalue>Sans 10</stringvalue>
</entry>
[...]
</gconf>
[/code]
Und bei Änderung auf Schriftart "Nimbus Sans L 11" ändert sich nur der Schriftart-Name (und die mtime).
[code]
<?xml version="1.0"?>
<gconf>
<entry name="font_name" mtime="1310645848" type="string">
<stringvalue>Nimbus Sans L 11</stringvalue>
</entry>
[...]
</gconf>
[/code]
Und so gesehen bringt mir das ganze wohl momentan gar nichts.
Also hatte ich zwischenzeitlich mal ein bisschen im WWW recherchiert, aber nur mit einem winzig kleinen Erfolg. Denn jetzt weiß ich durch eine PDF-Datei, dass das mit der eingestellten Systemschrift noch umfangreicher ist, als gedacht.
Die Zentrale Anlaufstelle dafür wäre nämlich eigentlich die [color=#008000][b]fonts.conf[/b][/color] unter [color=#008000][b]/etc/fonts/[/b][/color]. So steht es dort. Und diese Datei sollte dann ungefähr so aussehen, auszugsweise.
[code]
<!--
Provide required aliases for standard names
-->
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
...
...
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>Tahoma</family>
...
...
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Bitstream Vera Sans Mono</family>
...
...
</prefer>
</alias>
[/code]
Okay, die Datei habe ich auch gefunden, aber sie hat überhaupt keine Ähnlichkeit mit dem gezeigten Beispiel. Denn in der finde ich wohl als erstes einen Hinweis darauf, das diese Datei nicht geändert werden darf, und stattdessen eine [color=#008000][b]local.conf[/b][/color] gilt. So fern ich mich nicht vertue.
[quote="fonts.conf"]
DO NOT EDIT THIS FILE.
IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
LOCAL CHANGES BELONG IN 'local.conf'.
[/quote]
Ferner steht dort auch nur folgendes, bezüglich der Schrtarten (auszugsweise).
[quote="fonts.conf"]
Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>
<!--
[/quote]
Also habe ich mir jetzt auch noch mal die local.conf, genauer gesagt die [color=#008000][b]51-local.conf[/b][/color] angeschaut. Mit folgendem Ergebnis. Diesmal der gesamte Inhalt!
[quote="51-local.conf"]
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Load local system customization file -->
<include ignore_missing="yes">local.conf</include>
</fontconfig>
[/quote]
Aber auch das bringt mich nicht weiter. Also hab ich mir noch die [color=#008000][b]fonts.dtd[/b][/color] mal kurz angeschaut.
Hier ungekürzt.
[code]
<!-- This is the Document Type Definition for font configuration files -->
<!ELEMENT fontconfig (dir |
cache |
cachedir |
include |
config |
selectfont |
match |
alias)* >
<!--
Add a directory that provides fonts
-->
<!ELEMENT dir (#PCDATA)>
<!ATTLIST dir xml:space (default|preserve) 'preserve'>
<!--
Define the per-user file that holds cache font information.
If the filename begins with '~', it is replaced with the users
home directory path.
-->
<!ELEMENT cache (#PCDATA)>
<!ATTLIST cache xml:space (default|preserve) 'preserve'>
<!--
Add a directory that is searched for font cache files.
These hold per-directory cache data and are searched in
order for each directory. When writing cache files, the first
directory which allows the cache file to be created is used.
A leading '~' in a directory name is replaced with the users
home directory path.
-->
<!ELEMENT cachedir (#PCDATA)>
<!ATTLIST cachedir xml:space (default|preserve) 'preserve'>
<!--
Reference another configuration file; note that this
is another complete font configuration file and not
just a file included by the XML parser.
Set 'ignore_missing' to 'yes' if errors are to be ignored.
If the filename begins with '~', it is replaced with the users
home directory path.
-->
<!ELEMENT include (#PCDATA)>
<!ATTLIST include
ignore_missing (no|yes) "no"
xml:space (default|preserve) "preserve">
<!--
Global library configuration data
-->
<!ELEMENT config (blank|rescan)*>
<!--
Specify the set of Unicode encoding values which
represent glyphs that are allowed to contain no
data. With this list, fontconfig can examine
fonts for broken glyphs and eliminate them from
the set of valid Unicode chars. This idea
was borrowed from Mozilla
-->
<!ELEMENT blank (int)*>
<!--
Aliases are just a special case for multiple match elements
They are syntactically equivalent to:
<match>
<test name="family">
<string value=[family]/>
</test>
<edit name="family" mode="prepend">
<string value=[prefer]/>
...
</edit>
<edit name="family" mode="append">
<string value=[accept]/>
...
</edit>
<edit name="family" mode="append_last">
<string value=[default]/>
...
</edit>
</match>
-->
<!--
Periodically rescan the font configuration and
directories to synch internal state with filesystem
-->
<!ELEMENT rescan (int)>
<!--
Edit list of available fonts at startup/reload time
-->
<!ELEMENT selectfont (rejectfont | acceptfont)* >
<!ELEMENT rejectfont (glob | pattern)*>
<!ELEMENT acceptfont (glob | pattern)*>
<!ELEMENT glob (#PCDATA)>
<!ELEMENT pattern (patelt)*>
<!ENTITY % constant 'int|double|string|matrix|bool|charset|const'>
<!ELEMENT patelt (%constant;)*>
<!ATTLIST patelt
name CDATA #REQUIRED>
<!ELEMENT alias (family*, prefer?, accept?, default?)>
<!ATTLIST alias
binding (weak|strong|same) "weak">
<!ELEMENT prefer (family)*>
<!ELEMENT accept (family)*>
<!ELEMENT default (family)*>
<!ELEMENT family (#PCDATA)>
<!ATTLIST family xml:space (default|preserve) 'preserve'>
<!ENTITY % expr 'int|double|string|matrix|bool|charset
|name|const
|or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains
|plus|minus|times|divide|not|if|floor|ceil|round|trunc'>
<!--
Match and edit patterns.
If 'target' is 'pattern', execute the match before selecting a font.
if 'target' is 'font', execute the match on the result of a font
selection.
-->
<!ELEMENT match (test*, edit*)>
<!ATTLIST match
target (pattern|font|scan) "pattern">
<!--
Match a field in a pattern
if 'qual' is 'any', then the match succeeds if any value in the field matches.
if 'qual' is 'all', then the match succeeds only if all values match.
if 'qual' is 'first', then the match succeeds only if the first value matches.
if 'qual' is 'not_first', then the match succeeds only if any value other than
the first matches.
For match elements with target=font, if test 'target' is 'pattern',
then the test is applied to the pattern used in matching rather than
to the resulting font.
Match elements with target=scan are applied as fonts are scanned.
They edit the pattern generated from the scanned font and affect
what the fontconfig database contains.
-->
<!ELEMENT test (%expr;)*>
<!ATTLIST test
qual (any|all|first|not_first) "any"
name CDATA #REQUIRED
target (pattern|font|default) "default"
compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains) "eq">
<!--
Edit a field in a pattern
The enclosed values are used together to edit the list of values
associated with 'name'.
If 'name' matches one of those used in a test element for this match element:
if 'mode' is 'assign', replace the matched value.
if 'mode' is 'assign_replace', replace all of the values
if 'mode' is 'prepend', insert before the matched value
if 'mode' is 'append', insert after the matched value
if 'mode' is 'prepend_first', insert before all of the values
if 'mode' is 'append_last', insert after all of the values
If 'name' doesn't match any of those used in a test element:
if 'mode' is 'assign' or 'assign_replace, replace all of the values
if 'mode' is 'prepend' or 'prepend_first', insert before all of the values
if 'mode' is 'append' or 'append_last', insert after all of the values
-->
<!ELEMENT edit (%expr;)*>
<!ATTLIST edit
name CDATA #REQUIRED
mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign"
binding (weak|strong|same) "weak">
<!--
Elements of expressions follow
-->
<!ELEMENT int (#PCDATA)>
<!ATTLIST int xml:space (default|preserve) 'preserve'>
<!ELEMENT double (#PCDATA)>
<!ATTLIST double xml:space (default|preserve) 'preserve'>
<!ELEMENT string (#PCDATA)>
<!ATTLIST string xml:space (default|preserve) 'preserve'>
<!ELEMENT matrix (double,double,double,double)>
<!ELEMENT bool (#PCDATA)>
<!ELEMENT charset (#PCDATA)>
<!ATTLIST charset xml:space (default|preserve) 'preserve'>
<!ELEMENT name (#PCDATA)>
<!ATTLIST name xml:space (default|preserve) 'preserve'>
<!ELEMENT const (#PCDATA)>
<!ATTLIST const xml:space (default|preserve) 'preserve'>
<!ELEMENT or (%expr;)*>
<!ELEMENT and (%expr;)*>
<!ELEMENT eq ((%expr;), (%expr;))>
<!ELEMENT not_eq ((%expr;), (%expr;))>
<!ELEMENT less ((%expr;), (%expr;))>
<!ELEMENT less_eq ((%expr;), (%expr;))>
<!ELEMENT more ((%expr;), (%expr;))>
<!ELEMENT more_eq ((%expr;), (%expr;))>
<!ELEMENT contains ((%expr;), (%expr;))>
<!ELEMENT not_contains ((%expr;), (%expr;))>
<!ELEMENT plus (%expr;)*>
<!ELEMENT minus (%expr;)*>
<!ELEMENT times (%expr;)*>
<!ELEMENT divide (%expr;)*>
<!ELEMENT not (%expr;)>
<!ELEMENT if ((%expr;), (%expr;), (%expr;))>
<!ELEMENT floor (%expr;)>
<!ELEMENT ceil (%expr;)>
<!ELEMENT round (%expr;)>
<!ELEMENT trunc (%expr;)>
[/code]
Und nun habe ich keinen Durchblick mehr. Hab jetzt vollends die Orientierung verloren :roll:.
So wie ich es mir vorgestellt hatte, geht es nicht. Es gibt keine "einfache" Methode die System-Schrift auszulesen. Ich gebs auf.
Gruß
balu