I followed some QA links like this in tex stackexchange and use this example tex code:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage[algosection, boxruled, linesnumbered]{algorithm2e}
\SetProcNameSty{textbf}
\SetProcArgSty{textbf}
\SetProgSty{textbf}
\begin{document}
\begin{procedure}
\SetKwProg{Fn}{Function}{ is}{end}
\Fn{afunc(i: int) : int}{return 0;}
\caption{removemarked()}
\label{alg:removemarked}
\end{procedure}
\end{document}
I also viewed the official doc:
\SetKwProg{Prog}{Title}{ is}{end} Env is a block with ’Title’ (in CapSty style) at the beginning followed by args in ProgSty followed by ’is’ then ’text’ inside a block ended by ’end’.
In the output pdf, the procedure font has been modified to be bold by \SetProcNameSty{textbf} but the KwProg args afunc(i: int) : int haven't by changing ProgSty:

One workaround:
Then I tried to directly format the arg text by using \bfseries, i.e. \Fn{\bfseries afunc(i: int) : int}{return 0\;}, it works as expected.

Q: How to set the KwProg arg font style with something like \SetProgSty, e.g. by modifying the default italic with the textbf above?