Skip to content

Commit

Permalink
Publish v0.89
Browse files Browse the repository at this point in the history
  • Loading branch information
MWedl committed Jun 6, 2023
1 parent 6e11569 commit 2630e36
Show file tree
Hide file tree
Showing 23 changed files with 4,861 additions and 5,298 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v0.89 - 2023-06-06
* Update dependencies to fix vulnerabilities in python requests (CVE-2023-32681) and webpack (CVE-2023-28154)
* Prevent setting reference-type specific CSS classes to `<ref>` components with slot content
* Prevent buffering full `StreamingHttpResponse` causing high memory load
* Add fonts Roboto Flex, STIX Two Text and Arimo
* Remove non-variable fonts Roboto, Tinos, Lato and Courier Prime
* Configure fallback of common fonts to similar looking fonts (Arial, Helvetica, Times New Roman, Courier New, Verdana)


## v0.87 - 2023-05-24
* Provide (optional) base styles in designer via `@import "/assets/global/base.css";`
* Add `<ref>` component to designs to reference headings, figures, tables and findings
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Install fonts
WORKDIR /app/api/
COPY api/download_fonts.sh api/generate_notice.sh api/NOTICE /app/api/
COPY api/fontconfig.conf /etc/fonts/conf.d/00-sysreptor-fonts.conf
RUN chmod +x /app/api/download_fonts.sh && /app/api/download_fonts.sh

# Install python packages
Expand Down
16 changes: 12 additions & 4 deletions api/download_fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ set -e
while IFS= read -r fontname; do
FONTNAME_URL=$(echo "${fontname}" | tr " " "+")
FONTNAME_FS=$(echo "${fontname}" | tr "[:upper:]" "[:lower:]" | tr " " "_")
wget https://fonts.google.com/download?family=${FONTNAME_URL} -O /tmp/${FONTNAME_FS}.zip --quiet
FONT_URL="https://fonts.google.com/download?family=${FONTNAME_URL}"
echo "Downloading ${fontname} from ${FONT_URL}"
wget ${FONT_URL} -O /tmp/${FONTNAME_FS}.zip --quiet
mkdir -p /usr/share/fonts/truetype/${FONTNAME_FS}/
unzip -q /tmp/${FONTNAME_FS}.zip -d /usr/share/fonts/truetype/${FONTNAME_FS}/
if [[ ${FONTNAME_FS} = 'roboto_serif' ]]; then
Expand All @@ -16,17 +18,23 @@ while IFS= read -r fontname; do
rm -f /tmp/${FONTNAME_FS}.zip
done << EOF
Open Sans
Roboto
Roboto Flex
Roboto Serif
Lato
Exo
Tinos
STIX Two Text
Arimo
Source Code Pro
Roboto Mono
Tinos
Lato
Courier Prime
EOF
# Fonts installed with package manager:
# Noto: Noto Sans, Noto Serif, Noto Mono

# Remove Dejavu fonts (installed by debian)
rm -rf /usr/share/fonts/truetype/dejavu/
rm -f /etc/fonts/conf.d/*dejavu*

# Update font cache
fc-cache -f
67 changes: 67 additions & 0 deletions api/fontconfig.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default font -->
<match target="pattern">
<edit name="family" mode="append" binding="weak"><string>Noto Sans</string></edit>
</match>

<!-- Set default fonts to Noto -->
<alias>
<family>serif</family>
<prefer><family>Noto Serif</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>Noto Sans</family></prefer>
</alias>
<alias>
<family>sans</family>
<prefer><family>Noto Sans</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Noto Sans Mono</family></prefer>
</alias>

<!-- Aliases for commonly used fonts -->
<match>
<test name="family"><string>Arial</string></test>
<edit name="family" mode="assign" binding="strong"><string>Open Sans</string></edit>
</match>
<match>
<test name="family"><string>Helvetica</string></test>
<edit name="family" mode="assign" binding="strong"><string>Open Sans</string></edit>
</match>
<match>
<test name="family"><string>Verdana</string></test>
<edit name="family" mode="assign" binding="strong"><string>Arimo</string></edit>
</match>
<match>
<test name="family"><string>Times New Roman</string></test>
<edit name="family" mode="assign" binding="strong"><string>STIX Two Text</string></edit>
</match>
<match>
<test name="family"><string>Courier New</string></test>
<edit name="family" mode="assign" binding="strong"><string>Noto Sans Mono</string></edit>
</match>
<match>
<test name="family"><string>Roboto</string></test>
<edit name="family" mode="assign" binding="strong"><string>Roboto Flex</string></edit>
</match>


<!-- Aliases for deprecated fonts -->
<match>
<test name="family"><string>Tinos</string></test>
<edit name="family" mode="assign" binding="strong"><string>STIX Two Text</string></edit>
</match>
<match>
<test name="family"><string>Lato</string></test>
<edit name="family" mode="assign" binding="strong"><string>Open Sans</string></edit>
</match>
<match>
<test name="family"><string>Courier Prime</string></test>
<edit name="family" mode="assign" binding="strong"><string>Noto Sans Mono</string></edit>
</match>
</fontconfig>
Loading

0 comments on commit 2630e36

Please sign in to comment.