Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions background.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<link rel="preload" href="fonts/Roboto-Light.ttf" as="font" type="font/ttf" />
<link rel="preload" href="fonts/Roboto-Bold.ttf" as="font" type="font/ttf" />
<link rel="preload" href="fonts/lucide.ttf" as="font" type="font/ttf" />
<link rel="preload" href="fonts/NotoColorEmoji.ttf" as="font" type="font/ttf" />
<link href="stylesheets/fonts.css" rel="stylesheet" type="text/css" />
<link href="stylesheets/dist/manifest.css" rel="stylesheet" type="text/css" />
</head>
Expand Down
Binary file added fonts/NotoColorEmoji.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"dotenv": "^17.3.1",
"electron-localshortcut": "^3.2.1",
"electron-updater": "^6.3.9",
"emoji-mart": "https://github.com/session-foundation/session-emoji-mart/releases/download/v5.6.0/emoji-mart-v5.6.0.tgz",
"emoji-mart": "https://github.com/session-foundation/session-emoji-mart/releases/download/v5.6.2/emoji-mart-v5.6.2.tgz",
"filesize": "10.1.6",
"firstline": "^2.0.2",
"focus-trap-react": "^11.0.4",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions stylesheets/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@
font-family: 'Lucide';
src: url('../fonts/lucide.ttf') format('truetype');
}

/** Emoji font
* Download from https://fonts.google.com/noto/specimen/Noto+Color+Emoji
*/
@font-face {
font-family: 'NotoColorEmoji';
src: url('../fonts/NotoColorEmoji.ttf') format('truetype');
}
1 change: 1 addition & 0 deletions ts/components/conversation/SessionEmojiPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const StyledEmojiPanel = styled.div<{
border: var(--default-borders);
padding-bottom: var(--margins-sm);
--font-family: var(--font-default);
--emoji-font: 'NotoColorEmoji'; // Note: var(--emoji-font) doesn't go through shadow doms
--font-size: var(--font-size-sm);
--shadow: none;
--border-radius: 8px;
Expand Down
1 change: 1 addition & 0 deletions ts/components/conversation/message/reactions/Reaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const StyledReaction = styled.button<{
padding: 0 7px;
height: ${EMOJI_REACTION_HEIGHT}px;
min-width: ${props => (props.$showCount ? 2 * EMOJI_REACTION_HEIGHT : EMOJI_REACTION_HEIGHT)}px;
font-family: var(--font-default);

span {
width: 100%;
Expand Down
1 change: 1 addition & 0 deletions ts/components/dialog/ReactListModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const StyledContactContainer = styled.span`
const StyledReactionBar = styled(Flex)`
width: 100%;
margin: 12px 0 20px 4px;
font-family: var(--font-default);

p {
color: var(--text-secondary-color);
Expand Down
2 changes: 1 addition & 1 deletion ts/themes/globals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export function setSingleThemeValue(key: ThemeKeys, value: string) {

// These are only set once in the global style (at root).
export const THEME_GLOBALS: ThemeGlobals = {
'--font-default': 'Roboto',
'--font-default': 'Roboto, NotoColorEmoji',
'--font-accent': 'Loor',
'--font-mono': 'Roboto Mono',
'--font-icon': 'Lucide',
Expand Down
5 changes: 3 additions & 2 deletions ts/util/emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,16 @@ export async function initialiseEmojiData(data: any): Promise<void> {
if (!strings) {
return null;
}
return (Array.isArray(strings) ? strings : [strings])
const asArr = (Array.isArray(strings) ? strings : [strings])
.map(string =>
(split ? string.split(/[-|_|\s]+/) : [string]).map((s: string) => s.toLowerCase())
)
.flat();
return asArr;
})
.flat()
.filter(a => a && a.trim())
.join(',')})}`;
.join(',')}`;

(value as FixedBaseEmoji).skins.forEach(skin => {
ariaLabels[skin.native] = value.name;
Expand Down
Loading