sanskrit-lexicon / csl-websanlexicon

0 stars 1 forks source link

fonts directory #2

Closed funderburkjim closed 3 years ago

funderburkjim commented 4 years ago

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.

funderburkjim commented 4 years ago

font.css

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);

v00/makotemplates/fonts

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.

remove praja font file

This is proprietary. It should not be in this repository

subdirectory for unmentioned font files

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...

gasyoun commented 4 years ago

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.

funderburkjim commented 4 years ago

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.

gasyoun commented 4 years ago

Only praja is deleted, since it is proprietary.

So be it.

funderburkjim commented 4 years ago

deletion action for generate.py

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:

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:

funderburkjim commented 4 years ago

Delete unused font files from web directories

This is accomplished by:

Applying generate.py to all the dictionaries, via sh redo_cologne_all.sh

funderburkjim commented 4 years ago

Tidy praja and sanskrit2003 references

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

Remove webtc/font.css references to praja and sanskrit2003:

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;
}

Remove webtc2/main.js references to praja and sanskrit2003

These lines are in fact already in Javascript comments. To clean up the file, these lines and some of the enclosing comments are removed.

funderburkjim commented 4 years ago

Adjust webtc1/help/accents.html

This is part of some nice but underused documentation associated with the list display.

image

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.

funderburkjim commented 4 years ago

install changes for web directory of all dictionaries

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.

gasyoun commented 4 years ago

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.

funderburkjim commented 4 years ago

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.

gasyoun commented 4 years ago

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.