correct font in svg but wrong in html


correct font in svg but wrong in html
I build a logo with my custom font (DimaBarf.ttf) in svg format.
this is my code:
<svg width="276.7" height="93" xmlns="http://www.w3.org/2000/svg">
<defs>
<style type="text/css">
@font-face {
font-family: Barf;
src: url('./DimaBarf.ttf');
}
</style>
</defs>
<g>
<title>background</title>
<rect fill="#fff" height="93" width="276.7" y="0" x="0"/>
</g>
<g>
<title>Layer 1</title>
<rect rx="10" height="65" width="276.5" y="0" x="0" fill="#867965"/>
<text stroke="#000" transform="matrix(4.871815023846745,0,0,5.305484790354967,-1448.1636560162676,-511.74044508859515)" xml:space="preserve" text-anchor="first" font-family="Barf" font-size="24" y="110.4" x="297" stroke-width="0" fill="#d8c7b3">شینکاف</text>
</g>
</svg>
When I open the svg file, it shows my custom font correctly.
but when I add this svg in my html document, my custom font change to default system font.
This is my code in html format:
<div style="width:300px;">
<img src="./data/pictures/logo.svg" alt="logo" class="mx-auto d-block" width="100%" />
</div>
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.