diff --git a/ACKNOWLEDGMENTS.md b/ACKNOWLEDGMENTS.md index b195aa1ac..16e88d233 100644 --- a/ACKNOWLEDGMENTS.md +++ b/ACKNOWLEDGMENTS.md @@ -3469,7 +3469,9 @@ Signal Desktop makes use of the following open source projects. ## typeface-inter - Copyright (c) 2016-2018 The Inter Project Authors (me@rsms.me) + Copyright (c) 2016-2020 The Inter Project Authors. + "Inter" is trademark of Rasmus Andersson. + https://github.com/rsms/inter This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: diff --git a/fonts/inter-v3.10/Inter-Bold.woff2 b/fonts/inter-v3.10/Inter-Bold.woff2 deleted file mode 100644 index c40308808..000000000 Binary files a/fonts/inter-v3.10/Inter-Bold.woff2 and /dev/null differ diff --git a/fonts/inter-v3.10/Inter-BoldItalic.woff2 b/fonts/inter-v3.10/Inter-BoldItalic.woff2 deleted file mode 100644 index 9daf505ee..000000000 Binary files a/fonts/inter-v3.10/Inter-BoldItalic.woff2 and /dev/null differ diff --git a/fonts/inter-v3.10/Inter-Italic.woff2 b/fonts/inter-v3.10/Inter-Italic.woff2 deleted file mode 100644 index b8d5b912a..000000000 Binary files a/fonts/inter-v3.10/Inter-Italic.woff2 and /dev/null differ diff --git a/fonts/inter-v3.10/Inter-Regular.woff2 b/fonts/inter-v3.10/Inter-Regular.woff2 deleted file mode 100644 index db9970780..000000000 Binary files a/fonts/inter-v3.10/Inter-Regular.woff2 and /dev/null differ diff --git a/fonts/inter-v3.10/Inter-SemiBold.woff2 b/fonts/inter-v3.10/Inter-SemiBold.woff2 deleted file mode 100644 index 6a385ea69..000000000 Binary files a/fonts/inter-v3.10/Inter-SemiBold.woff2 and /dev/null differ diff --git a/fonts/inter-v3.10/Inter-SemiBoldItalic.woff2 b/fonts/inter-v3.10/Inter-SemiBoldItalic.woff2 deleted file mode 100644 index a2134919c..000000000 Binary files a/fonts/inter-v3.10/Inter-SemiBoldItalic.woff2 and /dev/null differ diff --git a/fonts/inter-v3.19/Inter-Bold.woff2 b/fonts/inter-v3.19/Inter-Bold.woff2 new file mode 100644 index 000000000..2846f29cc Binary files /dev/null and b/fonts/inter-v3.19/Inter-Bold.woff2 differ diff --git a/fonts/inter-v3.19/Inter-BoldItalic.woff2 b/fonts/inter-v3.19/Inter-BoldItalic.woff2 new file mode 100644 index 000000000..0b1fe8e12 Binary files /dev/null and b/fonts/inter-v3.19/Inter-BoldItalic.woff2 differ diff --git a/fonts/inter-v3.19/Inter-Italic.woff2 b/fonts/inter-v3.19/Inter-Italic.woff2 new file mode 100644 index 000000000..a619fc548 Binary files /dev/null and b/fonts/inter-v3.19/Inter-Italic.woff2 differ diff --git a/fonts/inter-v3.19/Inter-Medium.woff2 b/fonts/inter-v3.19/Inter-Medium.woff2 new file mode 100644 index 000000000..f92498a2e Binary files /dev/null and b/fonts/inter-v3.19/Inter-Medium.woff2 differ diff --git a/fonts/inter-v3.19/Inter-Regular.woff2 b/fonts/inter-v3.19/Inter-Regular.woff2 new file mode 100644 index 000000000..6c2b6893d Binary files /dev/null and b/fonts/inter-v3.19/Inter-Regular.woff2 differ diff --git a/fonts/inter-v3.19/Inter-SemiBold.woff2 b/fonts/inter-v3.19/Inter-SemiBold.woff2 new file mode 100644 index 000000000..611e90c95 Binary files /dev/null and b/fonts/inter-v3.19/Inter-SemiBold.woff2 differ diff --git a/fonts/inter-v3.19/Inter-SemiBoldItalic.woff2 b/fonts/inter-v3.19/Inter-SemiBoldItalic.woff2 new file mode 100644 index 000000000..545685bd2 Binary files /dev/null and b/fonts/inter-v3.19/Inter-SemiBoldItalic.woff2 differ diff --git a/package.json b/package.json index 78930ad8c..a31223494 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "sharp": "0.30.5", "split2": "4.0.0", "testcheck": "1.0.0-rc.2", - "typeface-inter": "3.10.0", + "typeface-inter": "3.18.1", "underscore": "1.12.1", "uuid": "3.3.2", "websocket": "1.0.28", diff --git a/stylesheets/_fontfaces.scss b/stylesheets/_fontfaces.scss index 8fd4a887c..a582a366d 100644 --- a/stylesheets/_fontfaces.scss +++ b/stylesheets/_fontfaces.scss @@ -3,34 +3,39 @@ @font-face { font-family: 'Inter'; - src: url('../fonts/inter-v3.10/Inter-BoldItalic.woff2'); + src: url('../fonts/inter-v3.19/Inter-BoldItalic.woff2'); font-weight: bolder; font-style: italic; } @font-face { font-family: 'Inter'; - src: url('../fonts/inter-v3.10/Inter-Bold.woff2'); + src: url('../fonts/inter-v3.19/Inter-Bold.woff2'); font-weight: bolder; } @font-face { font-family: 'Inter'; - src: url('../fonts/inter-v3.10/Inter-SemiBoldItalic.woff2'); + src: url('../fonts/inter-v3.19/Inter-SemiBoldItalic.woff2'); font-weight: bold; font-style: italic; } @font-face { font-family: 'Inter'; - src: url('../fonts/inter-v3.10/Inter-Italic.woff2'); + src: url('../fonts/inter-v3.19/Inter-Italic.woff2'); font-style: italic; } @font-face { font-family: 'Inter'; - src: url('../fonts/inter-v3.10/Inter-SemiBold.woff2'); + src: url('../fonts/inter-v3.19/Inter-SemiBold.woff2'); font-weight: bold; } +@font-face { + font-family: 'Inter'; + src: url('../fonts/inter-v3.19/Inter-Medium.woff2'); + font-weight: 500; +} @font-face { font-family: 'Inter'; - src: url('../fonts/inter-v3.10/Inter-Regular.woff2'); + src: url('../fonts/inter-v3.19/Inter-Regular.woff2'); } diff --git a/stylesheets/_mixins.scss b/stylesheets/_mixins.scss index 627e487c4..7dc1dd579 100644 --- a/stylesheets/_mixins.scss +++ b/stylesheets/_mixins.scss @@ -58,6 +58,10 @@ @include font-body-2; font-weight: 600; } +@mixin font-body-2-medium { + @include font-body-2; + font-weight: 500; +} @mixin font-body-2-italic { @include font-body-2; font-style: italic; diff --git a/stylesheets/components/MessageBody.scss b/stylesheets/components/MessageBody.scss index c589daa86..891b04581 100644 --- a/stylesheets/components/MessageBody.scss +++ b/stylesheets/components/MessageBody.scss @@ -56,6 +56,6 @@ } &__author { - @include font-body-2-bold; + @include font-body-2-medium; } } diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 9a4c9318d..d69feaa53 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -4891,12 +4891,13 @@ export class ConversationModel extends window.Backbone }); } - getTitle(): string { + getTitle({ isShort = false }: { isShort?: boolean } = {}): string { if (isDirectConversation(this.attributes)) { const username = this.get('username'); return ( this.get('name') || + (isShort ? this.get('profileName') : undefined) || this.getProfileName() || this.getNumber() || (username && window.i18n('at-username', { username })) || diff --git a/ts/models/messages.ts b/ts/models/messages.ts index 813e6c126..6bddb730b 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -841,7 +841,7 @@ export class MessageModel extends window.Backbone.Model { // if it's not selfAuthor and there's no incoming contact, // it might be a group notification, so we return undefined - return selfAuthor ?? this.getIncomingContact()?.getTitle(); + return selfAuthor ?? this.getIncomingContact()?.getTitle({ isShort: true }); } getNotificationText(): string { diff --git a/ts/util/avatarDataToBytes.ts b/ts/util/avatarDataToBytes.ts index ff121fd66..60b5f5132 100644 --- a/ts/util/avatarDataToBytes.ts +++ b/ts/util/avatarDataToBytes.ts @@ -40,7 +40,7 @@ async function drawImage( async function getFont(text: string): Promise { const font = new window.FontFace( 'Inter', - 'url("fonts/inter-v3.10/Inter-Regular.woff2")' + 'url("fonts/inter-v3.19/Inter-Regular.woff2")' ); await font.load(); diff --git a/yarn.lock b/yarn.lock index 11245cde2..214a1b219 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16205,10 +16205,10 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typeface-inter@3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/typeface-inter/-/typeface-inter-3.10.0.tgz#04a55d62e2dc3f60db3afab5d8a547e067692bc6" - integrity sha512-WuXE+TaJLB8pdMuvIVY3LfT5UQqndR8+Js0xfhNpdXlsEx0Abwd1bzg4w4YWl2eoOmmLYrRpx6UJJ7a7/q6wZQ== +typeface-inter@3.18.1: + version "3.18.1" + resolved "https://registry.yarnpkg.com/typeface-inter/-/typeface-inter-3.18.1.tgz#24cccdf29923f318589783997be20a662cd3ab9c" + integrity sha512-c+TBanYFCvmg3j5vPk+zxK4ocMZbPxMEmjnwG7rPQoV87xvQ6b07VbAOC0Va0XBbbZCGw6cWNeFuLeg1YQru3Q== typescript@4.6.2: version "4.6.2"