There are engraved lines. In the ancient time, people used knife to engrave the characters on shell and bone to express certain meanings. So the original meaning of the character is Engrave or Engraving. Because as more and more literature were engraved on stone, and bamboo slips, the meaning gradually changed to Literary.
The bronze scripts for the character are
very similar to the shell bone scripts
The small seal script for the character is
The clerical script is
We call shell bone script as 甲骨文 = Shell Bone 文, because they were engraved on shell or bone.
We call Tattoo as 文身 (engraving characters on body）- not 书身.
As time past, people learnt writing literary with brush, which is 書 (书）
which is discussed in Post 54.
The song typeface for the character is
In ancient time, engrave characters = 文, write characters = 书。
Ancient Chinese engraved big or small seal script on stone, wood, bamboo, and shell bone in the earlier time, but wrote them on bamboo slips, animal skin, silk cloth in the later time, so they are called as 文, or 篆. So we say big seal or small seal script as 篆文 (engraved characters)，or 篆书 (written characters)， but all other scripts as 書（书）, i.e. 隶书（clerical script), 楷书 (standard script), 行书（running script), and 草书（cursive script), because we use brush to write them on paper.
Now, 文 means articles, text, literary; 书 means books, writing. They are similar but not the same.
The Pinyin for 文 is Wen2.