Closed funderburkjim closed 3 years ago
Web font definitions are set up by css code in the webtc/font.css file; and only a few font files are mentioned:
# in csl-websanlexicon/v00/makotemplates directory
> grep -R '.[ot]tf' *
webtc/font.css: src: url(../../web/fonts/praja.ttf);
webtc/font.css: src: url(../../web/fonts/sanskrit2003.ttf);
webtc/font.css: src: url(../../web/fonts/siddhanta.ttf);
webtc/font.css: src: url(../../web/fonts/oldstandard.otf);
webtc/font.css: src: url(../../web/fonts/oldstandarditalic.otf);
webtc/font.css: src: url(../../web/fonts/CharterIndoCapital.otf);
MW has all 9 font files, so start fonts directory by copying
# current directory v00/makotemplates
cp -R ../../../MWScan/2014/web/fonts .
This gets us started with template files for fonts. But some editing is desirable.
This is proprietary. It should not be in this repository
We could use these, but currently they are not even mentioned in font.css. So we'll put them in a separate place, for now. There are 4 such files, and it seems ok to put them in a new makotemplates/fonts-unused folder. This is done manually.
Old Standard Indologique-Italic.otf
Old Standard Indologique-Italic.ttf
Old Standard Indologique-Regular.otf
sanskrit2003.ttf # this IS mentioned in font.css but is unused ... will be discussed further below
to be continued tomorrow...
webtc/font.css: src: url(../../web/fonts/praja.ttf); webtc/font.css: src: url(../../web/fonts/sanskrit2003.ttf); webtc/font.css: src: url(../../web/fonts/siddhanta.ttf);
I would not delete not of them. But to have choice between three.
webtc/font.css: src: url(../../web/fonts/oldstandard.otf); webtc/font.css: src: url(../../web/fonts/oldstandarditalic.otf);
So at least for Old Standard Indologique-Italic.ttf no need.
I do not remember for sure, but Old Standard Indologique-Italic.otf Old Standard Indologique-Regular.otf
could contain additional diacritics.
I would not delete not of them
Only praja is deleted, since it is proprietary.
The ones in fonts-unused are there for possible future use.
Only praja is deleted, since it is proprietary.
So be it.
The generate.py program currently transfers files in inventory.txt to web folders of a specified dictionary. For example, for Grassman dictionary:
python generate.py gra inventory.txt makotemplates ../../GRAScan/2014/web
Currently each file mentioned in the inventory.txt is classified as either:
images/cologne_univ_seal.gif:C
webtc/indexcaller.php:T
It is useful to add a 3rd possibility for files in inventory.txt: deletion (code = 'D').
For example: fonts/praja.ttf:D
. The action would be:
This is accomplished by:
fonts/praja.ttf:D
fonts/Old Standard Indologique-Italic.otf:D
fonts/Old Standard Indologique-Italic.ttf:D
fonts/Old Standard Indologique-Regular.otf:D
fonts/sanskrit2003.ttf:D
fonts/siddhanta.ttf:C
fonts/CharterIndoCapital.otf:C
fonts/oldstandard.otf:C
fonts/oldstandarditalic.otf:C
Applying generate.py to all the dictionaries, via
sh redo_cologne_all.sh
We can use grep -R "praja" *
to find which template files mention praja
. The files are:
webtc.font.css , webtc1/help/accents.html , webtc2/main.js
Similarly, sanskrit2003
is mentioned in these template files:
webtc.font.css , webtc2/main.js
These are the lines removed:
@font-face {
src: url(../../web/fonts/praja.ttf);
font-family: praja_deva;
}
.sdata_praja {
color:teal;
font-size:larger;
font-family: praja_deva;
}
@font-face {
src: url(../../web/fonts/sanskrit2003.ttf);
font-family: sanskrit2003_deva;
}
.sdata_sanskrit2003 {
color:teal;
font-size:larger;
font-family: sanskrit2003_deva;
}
These lines are in fact already in Javascript comments. To clean up the file, these lines and some of the enclosing comments are removed.
This is part of some nice but underused documentation associated with the list display.
This documentation actually needs to be updated. The update could either (a) Add a comment regarding the siddhanta web font, which displays the accents in the same way as praja font (b) Completely remove the mention of praja font, and replace with shorter comment regarding siddhanta.
A 'TODO' has been added to the dokuwiki so maybe this will be attended to sometime.
in v00 directory at Cologne: sh redo_cologne_all.sh
I think this task is completed, and the csl-websanlexicon now manages the web/fonts directories in a satisfactory way.
Did not get why reference to sanskrit2003 was removed. Replaced by Siddhanta?
(b) Completely remove the mention of praja font, and replace with shorter comment regarding siddhanta.
Would be enough. Still could mention that Peter Freund's font Praja was used before.
Replaced by Siddhanta?
Yes -- Siddhanta is the font used for Devanagari in the displays. Since Sanskrit2003 not (currently) used, no need to have it in the MWScan/2014/web/fonts, or in any of the fonts directories.
Since Sanskrit2003 not (currently) used, no need to have it in the MWScan/2014/web/fonts, or in any of the fonts directories.
I would leave it, to become an option one day.
In #1, it was noted that for each dictionary, there is a web/fonts directory; and that these contain the same font files (with one exception VCPScan/2014 has praja.ttf file).
An appropriate place to manage the font files used by displays in dictionary web directories is here, in the csl-websanlexicon.
This issue devoted to setting up this management of web fonts.