Let $C:=C([0,1],\mathbb{R})$ be the space of real-valued continuous functions defined on $[0,1]$. Could we find a topological vector space topology $\pi$ on $C$ such that the following two conditions are satisfied:

The unit ball $\{f\in C: ||f||:=\sup_{t\in [0,1]}|f(t)|\le 1\}$ is compact.

For every sequence $(f_n)\subset C$ converging to $f\in C$ under $\pi$, then one has $$f_n(0),~ f_n(1) \mbox{ and } \int_0^1f_n(t)dt \mbox{ converge respectively to } f(0),~ f(1) \mbox{ and } \int_0^1f(t)dt.$$

I was thinking about the weak topology and the weak star topology.

First, notice that $[0,1]$ is compact, then the dual space of $C$ is $rca([0,1])$, i.e. the space of (regular) Borel measures on [0,1] of bounded total variation, see e.g. page 255 Dunfond and Schwratz. Then clearly, as the dual space of $C$, $rca([0,1])$ is endowed with a topology induced by the following norm:

$$||\pi||=\sup_{||f||\le 1}\int_{[0,1]}f(t)\pi(dt). (\ast)$$

Moreover, it is easy to show that if $rca([0,1])$ is endowed with the weak topology, see e.g. page 175 Bogachev, then the corresponding dual space is $C$. But the weak topology is not equivalent to the topology $||\cdot||$.

Second, I may identify $C$ as a subspace of $rca([0,1])$ equipped with the topology induced by $(\ast)$. Denote by $rca([0,1])^{\ast}\supset C$ its dual space, and endowing the dual space with the weak star topology, it is easy to show the unit ball of $C$ is weakly compact, i.e. any sequence has a convergent subsequence under weak star topology, but I can not show the limit belongs to $C$.

If some one has an idea, please let me know. Thanks a lot!