"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/plugins/outhtml_modern_fonts.lua" (12 May 2020, 732 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lua source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 --[[
    2 Sample plugin file for highlight
    3 
    4 Adds modern monospace fonts
    5 ]]
    6 
    7 Description="Adds modern monospace fonts in HTML output"
    8 
    9 Categories = {"format", "html", "usability" }
   10 
   11 
   12 -- function to update theme definition
   13 -- optional parameter: theme description
   14 function themeUpdate()
   15 
   16   if (HL_OUTPUT == HL_FORMAT_HTML or HL_OUTPUT == HL_FORMAT_XHTML) then
   17     Injections[#Injections+1]="pre.hl, ol.hl { font-family: Consolas,Monaco,\"Andale Mono\",\"Ubuntu Mono\",monospace;}"
   18   end
   19 
   20 end
   21 
   22 
   23 --The Plugins array assigns code chunks to themes or language definitions.
   24 --The chunks are interpreted after the theme or lang file were parsed,
   25 --so you can refer to elements of these files
   26 
   27 Plugins={
   28 
   29   { Type="theme", Chunk=themeUpdate }
   30 
   31 }