Create a new double bracket symbol, or properly scale the existing one

mathtoolssymbolsunicode-math

In my document there already exists a math font configuration, but it doesn't contain the symbol for double brackets. Following this answer, I imported the one from the fourier font.

However, as can be seen from the picture, the symbol looks too small compare to the normal bracket:

enter image description here

Actually I think even [\mkern-4mu[ looks better, but unfortunately this does not work with \left and \right.

Thus, my question is that, would it be possible to scale these imported symbols? Or, even better, is there some way to define this symbol to look like [\mkern-4mu[ (thus consistent with the current math font) but can be automatically scaled with \left and \right (without having to write \left[\mkern-4mu\left[)?

Below is a MWE. To me the \mkern-4mu one is the most beautiful one, and I would be really apprieciable to know a way to define \llbracket as this.

\documentclass{article}

\usepackage[warnings-off={mathtools-colon, mathtools-overbracket}]{unicode-math}
\unimathsetup{math-style = ISO, partial = upright, nabla = upright}
\setmathfont{KpMath-Regular.otf}

\usepackage{mathtools}
\DeclareFontEncoding{FML}{}{}%
\DeclareFontSubstitution{FML}{futm}{m}{it}%
\DeclareFontEncoding{FMS}{}{}
\DeclareFontSubstitution{FMS}{futm}{m}{n}
\DeclareFontEncoding{FMX}{}{}
\DeclareFontSubstitution{FMX}{futm}{m}{n}
\DeclareSymbolFont{symbols}{FMS}{futm}{m}{n}%
\DeclareSymbolFont{largesymbols}{FMX}{futm}{m}{n}%

\DeclareMathDelimiter{\llbracket}{\mathopen}{symbols}{153}{largesymbols}{133}
\DeclareMathDelimiter{\rrbracket}{\mathclose}{symbols}{154}{largesymbols}{134}

\begin{document}

\begin{center}
    \( K  \llbracket X \rrbracket  [X]  [\mkern-4mu[ X ]\mkern-4mu]  \)
\end{center}

\[
    \left\llbracket \frac{X}{Y} \right\rrbracket  \left[ \frac{X}{Y} \right]  \left[\mkern-4mu\left[ \frac{X}{Y} \right]\mkern-4mu\right]
\]

\end{document}

enter image description here

Best Answer

First of all, you should use different names than symbols and largesymbols; then you can scale the symbols font scaled.

\documentclass{article}

\usepackage[warnings-off={mathtools-colon, mathtools-overbracket}]{unicode-math}
\unimathsetup{math-style = ISO, partial = upright, nabla = upright}
\setmathfont{KpMath-Regular.otf}

\usepackage{mathtools}

\DeclareFontEncoding{FML}{}{}
\DeclareFontSubstitution{FML}{futm}{m}{it}
\DeclareFontEncoding{FMS}{}{}
\DeclareFontSubstitution{FMS}{futm}{m}{n}
\DeclareFontEncoding{FMX}{}{}
\DeclareFontSubstitution{FMX}{futm}{m}{n}

\DeclareFontFamily{FMS}{futm}{\skewchar \font =48}
\DeclareFontShape{FMS}{futm}{m}{n}{<-> s * [1.2] futsy}{}

%\DeclareFontFamily{FMX}{futm}{}
%\DeclareFontShape{FMX}{futm}{m}{n}{<-> s * [0.92] fourier-mex}{}

\DeclareSymbolFont{fouriersymbols}{FMS}{futm}{m}{n}%
\DeclareSymbolFont{fourierlargesymbols}{FMX}{futm}{m}{n}%

\DeclareMathDelimiter{\llbracket}{\mathopen}{fouriersymbols}{153}{fourierlargesymbols}{133}
\DeclareMathDelimiter{\rrbracket}{\mathclose}{fouriersymbols}{154}{fourierlargesymbols}{134}

\begin{document}

\begin{center}
\( K  \llbracket X \rrbracket  [X] \)
\end{center}

\[
\left\llbracket \frac{X}{Y} \right\rrbracket  \left[ \frac{X}{Y} \right]  
\]

\end{document}

I reported (commented out) the setting for the large symbols font.

enter image description here

Experiment with various scaling factors, but you'll not get good alignment anyway.

A different strategy might be to do

\usepackage[only,llbracket,rrbracket]{stmaryrd}

instead of importing from fourier.

enter image description here