#StackBounty: #fonts #jekyll #github-pages #webfonts #hitcounter How to implement a basic page view counter for a GitHub-Pages-powered …

Bounty: 100

I want to host a Jekyll blog using GitHub Pages.
I have purchased a license to display a web font for up to 50.000 page views/month.
I order to not violate this agreement, I need to implement some kind of mechanism to count page views, so that I can take action whenever I reached 50,000 page views.

I have some rather complicated ideas in my head.
On the one hand, I was thinking about performing a call to some AWS Lambda function that counts each page view, and takes action if it is one too many.
On the other hand, I learned that MyFonts, Linotype and other font shops offer some of their web fonts using a licensing model called “pay-as-you-go”, in which case they do mandate their customers to use a page view counter they provide, so that they can charge continuously, whenever certain quotas are hit.
Their customers add those page view counters to their web sites by linking to a unique CSS file hosted by the respective font shop.

However, since I am probably not the only one having to deal with this, I wonder how other people solve this.
My ideas seem to be a little over the top for what really is just a page view counter.

Is there an easier way? How is it commonly done?


Get this bounty!!!

#StackBounty: #html #css #google-chrome #fonts #preload Chrome unused preload warning for an icon font that is used

Bounty: 50

I have an icon font that I preload in Chrome with

<link rel="preload" as="font" type="font/ttf" href="/static/media/IconFont.ad47b1fb.ttf" crossorigin="anonymous">

and reference later in my CSS with

@font-face {
  font-family: "IconFont";
  src: url(/static/media/IconFont.d9fff078.eot);
  src: url(/static/media/IconFont.d9fff078.eot#iefix)
      format("embedded-opentype"),
    url(/static/media/IconFont.ad47b1fb.ttf) format("truetype"),
    url(/static/media/IconFont.c8a8e064.woff) format("woff"),
    url(/static/media/IconFont.979fb19e.svg#IconFont) format("svg");
  font-weight: normal;
  font-style: normal;
}

Within one second of the page loading I use Unicode code point U+E95B with my icon font.

I still get a warning from Chrome, though, that says:

The resource http://localhost:3000/static/media/IconFont.ad47b1fb.ttf was
preloaded using link preload but not used within a few seconds from the
window's load event. Please make sure it has an appropriate `as` value and
it is preloaded intentionally.

How do I get rid of this warning?


Get this bounty!!!

#StackBounty: #fonts #table-of-contents #color #styles Switch font and color of TOC and LOT titles

Bounty: 150

What I’m trying to do is pretty basic it seems, but it’s also above my pay grade: change the font and the color used for the TOC title Contents and the LOT title List of Tables (see attached screen caps).

I’d like the Candara font I use for my chapters, and the color I’ve picked for them, to be used for both “Table of Contents” and “List of Tables”

% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

documentclass[oneside,centered,twocolumn]{book}
%documentclass[a4paper,oneside,centered,twocolumn]{book}
special{papersize=215.9mm,279.4mm}
%usepackage[top=3cm, bottom=3.2cm, left=2.5cm, right=2.5cm]{geometry}

usepackage[english]{babel}
usepackage{tocloft} % Customization of TOC LOF LOT
usepackage[table,xcdraw]{xcolor} % For shading in tables
usepackage{pdfcolmk}
usepackage{multirow}

%usepackage{lscape} %to put the long table of dwellings sideways
%usepackage{wallpaper}
usepackage{blindtext}
%usepackage{showframe}

usepackage{textcomp}
usepackage{pdfpages}
usepackage{ltablex}
usepackage{nicefrac} % to write fractions
usepackage{attrib} % For source of quotations
usepackage{lettrine} % For NewThought formatting
usepackage{array} % To define width of columns in long table
usepackage{booktabs} % Nicer spacing in columns
usepackage{siunitx} % To write Celsius, etc.
usepackage{enumitem} % To create item lists
usepackage{caption} % To change way captions are labelled
usepackage{scrextend}
usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
usepackage{etoolbox} % To make table footnote font smaller
usepackage{threeparttablex}
apptoTPTnoteSettings{footnotesize}
usepackage{textcomp} % For Numero symbol
usepackage[T1]{fontenc}
usepackage{titlesec,color}
usepackage{xcolor}
usepackage[linguistics,edges]{forest}
usepackage{tikz}
usetikzlibrary{calc}
usepackage{titling}
usepackage{fontspec}
usepackage{newpxtext} % Font for document instead of obsolete Palatino
usepackage{fancyhdr}
usepackage{etoolbox}

% To make TOC in two columns and List of Tables into one column.
usepackage{multitoc}
makeatletter
renewcommand*{@starttoc}[1]{%
            ifthenelse{equal{#1}{toc}}{%
            ifnummulticolumntoc>1
            begin{multicols}{multicolumntoc}%
                @multitoc@starttoc{#1}%
            end{multicols}%
            else
            @multitoc@starttoc{#1}%
            fi}{}%
        ifthenelse{equal{#1}{lot}}{%
            ifnummulticolumnlot>1
            begin{multicols}{multicolumnlot}%
                @multitoc@starttoc{#1}%
            end{multicols}%
            else
            @multitoc@starttoc{#1}%
            fi}{}%
        ifthenelse{equal{#1}{lof}}{%
            ifnummulticolumnlof>1
            begin{multicols}{multicolumnlof}%
                @multitoc@starttoc{#1}%
            end{multicols}%
            else
            @multitoc@starttoc{#1}%
            fi}{}%
}
makeatother
renewcommand{multicolumnlot}{1}


% CHAPTER, SECTION, SUBSECTION STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

newfontfamilyheadingfont[]{Candara}
titleformat{chapter}[display]
{bfseriescolor{blue}filcenterfontsize{35}{35}headingfont} % Size of Chapter1&Chapter
{hugeMakeUppercaseheadingfont{chaptertitlename} thechapter}
{12pt}
{tikz[remember picture,overlay]node[inner sep=0pt] at ($(current page.north) +
        (0pt,-117pt)$) {includegraphics[width=14cm]{chapterHead_10cm}};}
titlespacing{chapter}{0pt}{50mm}{42.5mm}
titleformat*{section}{LARGEcolor{orange}headingfont}
titleformat*{subsection}{Largecolor{orange}headingfont}
titleformat*{subsubsection}{largecolor{orange}headingfont}
renewcommand{maketitlehooka}{headingfont}

begin{document}

% To inlcude background wallpaper/image
%CenterWallPaper{1}{TKML_ESB_Page_Background_2}

%layout    

% FRONTMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

frontmatter

tableofcontents
clearpage

addcontentsline{toc}{section}{listtablename}
listoftables
clearpage

onecolumn
thispagestyle{plain} % To not have "List of Tables appear" at the top of the "Preface" page
section{Preface}
blindtext
clearpage

thispagestyle{plain} % To not have "List of Tables appear" at the top of the "Preface" page
section{Introduction}
blindtext
twocolumn

clearpage

% MAINMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

mainmatter

blindtext

end{document}

Contents
LOF


Get this bounty!!!

#StackBounty: #linux #fonts #fontconfig #deepin Changing font family for characters of a certain language/script using fontconfig?

Bounty: 50

I am on Arch Linux, Deepin Desktop. I am using Noto Serif as my standard font, but I don’t like its Arabic characters. So my goal is to use another font just for arabic characters.

Here is what I have tried. I created a new configuration file in /etc/fonts/conf.d/ with the following contents:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test name="lang" compare="contains">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Naskh Arabic</string>
        </edit>
    </match>

    <match target="pattern">
        <test name="lang" compare="contains">
            <string>ar</string>
        </test>
        <test qual="any" name="family">
            <string>serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Naskh Arabic</string>
        </edit>
    </match>
</fontconfig>

I then ran fc-cache -r. But this didn’t work, the same font is still in use and running fc-match returns NotoSerif-Regular.ttf: "Noto Serif" "Regular" just as before.


Get this bounty!!!

#StackBounty: #fonts #pdf #18.04 #poppler wrong letter positioning and font in PDF form

Bounty: 50

I’m using Ubuntu 18.04 and filling out the SS-5 Social Security Administration from. However, some of the letters are wrongly positioned.

Here’s how it looks in

Evince 3.28.2-1:

evince screenshot

xpdf 3.04-7:

xpdf screenshot

mudpdf 1.12.0 (which does not use libpoppler):

mupdf screenshot

The built-in PDF reader for Firefox 59.0.2:

firefox screenshot

The built-in PDF reader for Chromium 65.0.3325.181:

chromium screenshot

Evince and xpdf depend on libpoppler73 version 0.62.0-2ubuntu2.

Here is the output of pdffonts:

$ pdffonts ss-5.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
IHPIKC+ArialMT                       CID TrueType      Identity-H       yes yes yes    824  0
ArialMT                              TrueType          WinAnsi          no  no  no     826  0
Arial-BoldMT                         TrueType          WinAnsi          no  no  no     828  0
CourierStd                           Type 1            WinAnsi          no  no  no     145  0
Helvetica                            Type 1            WinAnsi          no  no  no     197  0
MyriadPro-Regular                    Type 1            WinAnsi          no  no  no     198  0
ZapfDingbats                         Type 1            ZapfDingbats     no  no  no     199  0

I have already installed the ttf-mscorefonts-installer and poppler-data packages.

Here are my questions:

  • Can I change the font used for filling in the cells of the form?

    It seems like Evince and xpdf are using a variable-width font when they should be using a monospaced font, and maybe this is causing the positioning problem.

  • If I were to file a bug report, should I file it as a poppler issue, a fontconfig issue, or somewhere else?


Get this bounty!!!

#StackBounty: #windows-7 #windows #fonts #control-panel Why font shows up twice in Control Panel / Fonts and how to handle

Bounty: 50

I have a custom font installed on a computer with Win 7 Professional.

There is an Italic and a Regular face:

  1. MyFont.otf
  2. MyFont-Italic.otf

When I list the C:WindowsFonts folder using dir MyFont* only these two fonts are listed.

However when I open the Fonts folder in Control Panel, there is one font family listed as “MyFont” but opening up the family, there are 2 icons, 2 for each of the above .otf files. (Note: of course there are no other fonts called MyFont on the system.)

When I right-click them and look at their properties, they are duplicates and point to the same file respectively, in C:WindowsFonts.

Why is this behavior? And how do I remove the duplicate icons in the Control Panel / Fonts folder?


Get this bounty!!!

#StackBounty: #configuration #fonts #fontconfig #emoji Use a specific font for emojis

Bounty: 100

i’d like to use the pretty Segoe UI Symbol emoji.

I installed the font by copying it over from my windows install, and awesomely enough, my system falls back to it for all emoji that my main font doesn’t have. But all (black and white) emoji existing in my main font are used.

How can I tell fontconfig to prefer “Segoe UI Symbol” for certain unicode ranges (the ones defined here)?


Get this bounty!!!

#StackBounty: #fonts #mtpro #math-fonts #newtxmath Problem with scale of imported glyphs

Bounty: 50

Traying to obtain the Times 4-Line Mathematics used in old math books of Springer (and many other scientific textbooks) I downloaded the mtpro2 lite package. However, this package doesn’t include a varg option, like newtxmath, as far as I know.

So, following Egreg’s answers and, I have imported the glyphs varg, varv and varw to my document.

The problem is that it seems they are quite smaller than the mtpro2 fonts:

enter image description here

The following image corresponds to the Springer’s book of Morris W Hirsch Differential Topology:

enter image description here

Certaily, the glyph looks different, but the main problem I see is that the varg and especially varv seem quite smaller; in my opinion the $x$ is quite taller.

Do you know a way to correct that? I thought in using the package newtxmath instead of mtpro2 and import the z glyph (with the upright base). The problem is that I would have to change also the italic z in normal text.

Here I attach the mwe:

documentclass{article}
usepackage[scaled=0.92]{helvet}    % set Helvetica as the sans-serif font
renewcommand{rmdefault}{ptm}      % set Times as the default text font
usepackage[lite,subscriptcorrection,slantedGreek,nofontinfo]{mtpro2}

%var letters
DeclareFontFamily{U}{ntxmia}{skewcharfont=127 }
DeclareFontShape{U}{ntxmia}{m}{it}{
  <-> ntxmia
}{}
DeclareFontShape{U}{ntxmia}{b}{it}{
  <-> txbmia
}{}
DeclareSymbolFont{ntxmia}{U}{ntxmia}{m}{it}
SetSymbolFont{ntxmia}{bold}{U}{ntxmia}{m}{it}
DeclareMathSymbol{varg}{mathord}{ntxmia}{49}
DeclareMathSymbol{varv}{mathord}{ntxmia}{51}
DeclareMathSymbol{varw}{mathord}{ntxmia}{52}
AtBeginDocument{mathcode`g=varg}
AtBeginDocument{mathcode`v=varv}
AtBeginDocument{mathcode`w=varw}


begin{document}

[
gxv qquad {(x,g(x)):xin U} qquad v(x)
]

end{document}

Thanks in advance and happy new year.


Get this bounty!!!