Блог пользователя weedy

Автор weedy, история, 7 месяцев назад, По-английски

MikeMirzayanov Hello Mike,

I am writing to bring to your attention a recent issue with the "Build PDF Statements" feature on Polygon. Over the past couple of days, several users (including myself) have encountered unexpected font-related issues that were not present before.

Specifically, if we add certain \usepackage commands in the statements.ftl file, the rendered PDF exhibits abnormal font behavior. For example:

  • Adding \usepackage[UTF8]{ctex} or \usepackage{CJK} (which is necessary for Chinese content, and until a few days ago, this worked fine.) disrupts the rendering of \textbf text.

In addition, other packages related to font specification will also cause abnormal font rendering.

  • Adding \usepackage{lmodern} causes irregularities in the appearance of \texttt, \textbf, and \textsf text. (And none of these text matches the looking of Latin Modern)

  • Adding \usepackage{helvet} affects the output of \textsf text. (And none of these text matches the looking of Helvetica)

May be due to caches, if the statements PDF has been built before, we may need to modify the content of the statements (e.g. legend, input/output format or file such as statements.ftl) before triggering the bug.

Some example building results are listed below.

Spoiler

These issues are particularly impactful for problem authors working with statements of non-Latin languages (i.e. Unicode-based languages), who rely on additional packages (e.g. package CJK for Chinese, Japanese and Korean) to build statements PDF correctly.

To address this, I would like to suggest switching from pdfLaTeX to XeLaTeX as the default engine for generating PDF statements on Polygon. XeLaTeX offers native support for Unicode input and improved compatibility with OpenType and TrueType fonts, which would resolve the current font issues and provide a more robust solution for multilingual problem statements.

Thank you for your time and consideration. I greatly appreciate your work on Polygon and Codeforces, and I believe this change would benefit many problem authors in the community.

Best regards,

Полный текст и комментарии »

  • Проголосовать: нравится
  • +62
  • Проголосовать: не нравится