Am Freitag, 10. August 2018 14:58:41 CEST schrieb Jürgen Spitzmüller 
<sp...@lyx.org>:
> Am Freitag, den 10.08.2018, 14:50 +0200 schrieb Kornel Benko:
> > What is the reason to not include them in lyx?
> > Is it because we can use Bera instead?
> 
> Because nobody did it.
> 
> Don't forget the file format change.
> 
> Jürgen
> 
> > 
> >     Kornel
> 

Would the following work? And is it OK to not have the conversion routine?
###############################
def revert_dejavu(document):
    " Revert native DejaVu font definition to LaTeX "

    if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
        dejavu_fonts = ["DejaVuSerif", "DejaVuSerifCondensed", "DejaVuSans",
                         "DejaVuSansMono", "DejaVuSansCondensed"]
        font_types = ["\\font_roman", "\\font_sans", "\\font_typewriter"]
        for ft in font_types:
            i = find_token(document.header, ft, 0)
            if i != -1:
                val = get_value(document.header, ft, i)
                if val in dejavu_fonts:
                    preamble = "\\usepackage{%s}" % val
                    add_to_preamble(document, [preamble])
                    document.header[i] = document.header[i].replace(val, 
"default")
###############################

Also looking into lyx_2_4.py
revert =  [
           [558, [revert_timeinfo, revert_namenoextinfo]],
           [558, [revert_dateinfo]],
...
looks wrong (2 times 558). Do I miss something here?

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to